windisplay: fix origin not changing upon window being dragged

This commit is contained in:
rdb 2017-09-19 19:16:48 +02:00
parent 7ff8b62fb8
commit 019df482d6
1 changed files with 10 additions and 6 deletions

View File

@ -1440,15 +1440,12 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
break;
case WM_SIZE:
// Actually, since we don't return in WM_WINDOWPOSCHANGED, WM_SIZE won't
// end up being called at all. This is more efficient according to MSDN.
if (windisplay_cat.is_debug()) {
windisplay_cat.debug()
<< "WM_SIZE: " << hwnd << ", " << wparam << "\n";
}
// Resist calling handle_reshape before the window has opened.
if (_hWnd != NULL) {
handle_reshape();
}
break;
case WM_EXITSIZEMOVE:
@ -1456,8 +1453,15 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
break;
case WM_WINDOWPOSCHANGED:
if (windisplay_cat.is_debug()) {
windisplay_cat.debug()
<< "WM_WINDOWPOSCHANGED: " << hwnd << ", " << wparam << "\n";
}
if (_hWnd != NULL) {
handle_reshape();
}
adjust_z_order();
break;
return 0;
case WM_PAINT:
// In response to WM_PAINT, we check to see if there are any update