diff options
| author | Pietro Gagliardi <[email protected]> | 2014-06-25 23:21:57 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-06-25 23:21:57 -0400 |
| commit | 1eeadc000ae796bd022879196c4f2bae3bb189de (patch) | |
| tree | e63f905f533f183935850b04f5ab8356e06e7084 /stdwndclass_windows.go | |
| parent | 9a3e73b46001219177bb13a381420007217dfecf (diff) | |
Made the new sizing system work on Windows.
Diffstat (limited to 'stdwndclass_windows.go')
| -rw-r--r-- | stdwndclass_windows.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/stdwndclass_windows.go b/stdwndclass_windows.go index f907b43..9d6fc35 100644 --- a/stdwndclass_windows.go +++ b/stdwndclass_windows.go @@ -148,7 +148,7 @@ func stdWndProc(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESUL _ = mm return 0 case _WM_SIZE: - if s.resize != nil { + if s.allocate != nil { var r _RECT r1, _, err := _getClientRect.Call( @@ -157,8 +157,8 @@ func stdWndProc(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam _LPARAM) _LRESUL if r1 == 0 { panic("GetClientRect failed: " + err.Error()) } - // top-left corner is (0,0) so no need for winheight - s.doResize(int(r.left), int(r.top), int(r.right-r.left), int(r.bottom-r.top), 0) + // top-left corner of a client rect is (0,0) so no need for left/top + s.resizeWindow(int(r.right), int(r.bottom)) // TODO use the Defer movement functions here? // TODO redraw window and all children here? } |
