summaryrefslogtreecommitdiff
path: root/stdwndclass_windows.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-13 11:42:21 -0500
committerPietro Gagliardi <[email protected]>2014-02-13 11:42:21 -0500
commita400ec666641893142b5f89ff6f55b90ccb26359 (patch)
treef63615cd3d47185c82341ee6a35242addaac429d /stdwndclass_windows.go
parent5626b9e35c5824707a905a26f9b074240cd54e7a (diff)
Fixed the resizing deadlock.
Diffstat (limited to 'stdwndclass_windows.go')
-rw-r--r--stdwndclass_windows.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/stdwndclass_windows.go b/stdwndclass_windows.go
index 2824746..276fdc6 100644
--- a/stdwndclass_windows.go
+++ b/stdwndclass_windows.go
@@ -51,10 +51,13 @@ func stdWndProc(s *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam
if r1 == 0 {
panic("GetClientRect failed: " + err.Error())
}
- err = s.resize(int(r.Left), int(r.Top), int(r.Right), int(r.Bottom))
- if err != nil {
- panic("child resize failed: " + err.Error())
- }
+ // run the resize in a goroutine, since the WndProc is being run on uitask
+ go func() {
+ err = s.resize(int(r.Left), int(r.Top), int(r.Right), int(r.Bottom))
+ if err != nil {
+ panic("child resize failed: " + err.Error())
+ }
+ }()
}
return 0
case _WM_CLOSE: