summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2014-05-07 13:19:40 +0200
committerTor Andersson <tor.andersson@artifex.com>2014-05-07 13:19:40 +0200
commit6d92ef42d2c04e7c0aac9fe5b7da8e8771d7bd99 (patch)
tree76dece23ad91741c57a382e4e98fc1374bac9239
parentba15a8cd3238a3a3c098ad8b7d96cb0e405fc26f (diff)
downloadmupdf-6d92ef42d2c04e7c0aac9fe5b7da8e8771d7bd99.tar.xz
Fix 694510: Detect all ways to maximize a window in win32.
SC_MAXIMIZE is only sent when maximizing via the maximize button. Dragging to the screen edge, double clicking the title bar or WinKey+Up do not generate an SC_MAXIMIZE message. Detect when gettincg a WM_SIZE message with SIZE_MAXIMIZE instead.
-rw-r--r--platform/x11/win_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/x11/win_main.c b/platform/x11/win_main.c
index 5c431ee2..3804f671 100644
--- a/platform/x11/win_main.c
+++ b/platform/x11/win_main.c
@@ -987,8 +987,6 @@ frameproc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
info();
return 0;
}
- if (wParam == SC_MAXIMIZE)
- gapp.shrinkwrap = 0;
break;
case WM_SIZE:
@@ -999,6 +997,8 @@ frameproc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
GetClientRect(hwnd, &rect);
MoveWindow(hwndview, rect.left, rect.top,
rect.right-rect.left, rect.bottom-rect.top, TRUE);
+ if (wParam == SIZE_MAXIMIZED)
+ gapp.shrinkwrap = 0;
return 0;
}