Fix bug on Windows when resizing windows in any way other than dragging them

This commit is contained in:
rdb 2014-09-15 16:46:28 +00:00
parent 9184fe71a9
commit e5ec2eaf50
2 changed files with 6 additions and 21 deletions

View File

@ -94,7 +94,6 @@ WinGraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe,
_ime_open = false;
_ime_active = false;
_tracking_mouse_leaving = false;
_maximized = false;
_cursor = 0;
_lost_keypresses = false;
_lshift_down = false;
@ -1489,25 +1488,12 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
windisplay_cat.debug()
<< "WM_SIZE: " << hwnd << ", " << wparam << "\n";
}
// for maximized, unmaximize, need to call resize code
// artificially since no WM_EXITSIZEMOVE is generated.
if (wparam == SIZE_MAXIMIZED) {
_maximized = true;
handle_reshape();
} else if (wparam == SIZE_RESTORED && _maximized) {
// SIZE_RESTORED might mean we restored to its original size
// before the maximize, but it might also be called while the
// user is resizing the window by hand. Checking the _maximized
// flag that we set above allows us to differentiate the two
// cases.
_maximized = false;
handle_reshape();
}
break;
case WM_EXITSIZEMOVE:
handle_reshape();
//handle_reshape();
break;
case WM_WINDOWPOSCHANGED:

View File

@ -160,7 +160,6 @@ private:
bool _ime_open;
bool _ime_active;
bool _tracking_mouse_leaving;
bool _maximized;
bool _bCursor_in_WindowClientArea;
HANDLE _input_device_handle[32];
HCURSOR _cursor;