summaryrefslogtreecommitdiff
path: root/stdwndclass_windows.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-03-17 20:42:36 -0400
committerPietro Gagliardi <[email protected]>2014-03-17 20:42:36 -0400
commit19227080da161bc96e4cc8ed447059cefbca8a6a (patch)
tree818f4d443f469ee962268449d86ca406a7399514 /stdwndclass_windows.go
parentc078266c6d091610eb3acddd68090ee697142315 (diff)
Changed window resizes so that the actual Control.setRect() functions appended to an array of requests that the resize() function set all at once instead of having each done individually. This will be necessary for what I think will be a solution to the deadlocks. It doesn't work right now; I'm assuming it's allocating too much memory. I know how to fix this, but I'm committing what I have so far to be safe.
Diffstat (limited to 'stdwndclass_windows.go')
-rw-r--r--stdwndclass_windows.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/stdwndclass_windows.go b/stdwndclass_windows.go
index 727158d..54cec7d 100644
--- a/stdwndclass_windows.go
+++ b/stdwndclass_windows.go
@@ -53,9 +53,12 @@ func stdWndProc(s *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam
panic("GetClientRect failed: " + err.Error())
}
// top-left corner is (0,0) so no need for winheight
- err = s.resize(int(r.Left), int(r.Top), int(r.Right), int(r.Bottom), 0)
- if err != nil {
- panic("child resize failed: " + err.Error())
+ resizeList := s.resize(int(r.Left), int(r.Top), int(r.Right), int(r.Bottom))
+ for _, s := range resizeList {
+ err = s.sysData.setRect(s.x, s.y, s.width, s.height, 0)
+ if err != nil {
+ panic("child resize failed: " + err.Error())
+ }
}
}
return 0