diff options
| author | Pietro Gagliardi <[email protected]> | 2014-04-07 14:32:25 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-04-07 14:32:25 -0400 |
| commit | 3bf215ae4edb616c14c4525638cf54425d6e8f36 (patch) | |
| tree | 3c253a36643b8ab6891545c217d9af906efc3358 /stdwndclass_windows.go | |
| parent | 00acf74177e520c2f961fb478e7674d24c9077c9 (diff) | |
Split out the common resizing code into its own function so that it's all in one place. This will also affect what happens if I switch to DeferWindowPos() on Windows.
Diffstat (limited to 'stdwndclass_windows.go')
| -rw-r--r-- | stdwndclass_windows.go | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/stdwndclass_windows.go b/stdwndclass_windows.go index 5ce356b..e3368ca 100644 --- a/stdwndclass_windows.go +++ b/stdwndclass_windows.go @@ -53,15 +53,8 @@ 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 - s.resizes = s.resizes[0:0] // set len to 0 without changing cap - s.resize(int(r.Left), int(r.Top), int(r.Right), int(r.Bottom), &s.resizes) + s.doResize(int(r.Left), int(r.Top), int(r.Right), int(r.Bottom), 0) // TODO use the Defer movement functions here? - for _, s := range s.resizes { - err = s.sysData.setRect(s.x, s.y, s.width, s.height, 0) - if err != nil { - panic("child resize failed: " + err.Error()) - } - } } return 0 case _WM_CLOSE: |
