winemac: Allow the user to attempt to resize a maximized window and try to restore...
commit8d581d0e489c6bf7d54674adc0ea695e8adc978f
authorKen Thomases <ken@codeweavers.com>
Mon, 23 Mar 2015 23:58:06 +0000 (23 18:58 -0500)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 24 Mar 2015 04:55:18 +0000 (24 13:55 +0900)
tree87e735d2afbb3ed416697d834ee89c2841665760
parent0a923299144e84ef8b1acdd81949ef99ad43f581
winemac: Allow the user to attempt to resize a maximized window and try to restore it if they do.

OS X doesn't have the same concept of maximized windows as Windows does.
There's no mode that prevents a normally-resizable window from being resized.
If a window is "zoomed", it mostly fills the screen but the user can still
move or resize it, at which point it ceases to be in the zoomed state.  So,
users are confused and frustrated when they can't resize a window that's
maximized.

To get similar behavior while still respecting Win32 semantics, we now let the
user try to resize maximized windows.  (The resize cursors are shown at the
edges of the window frame.)  When they start, a request is submitted to the app
to restore the window.  Unless and until the window is restored, we don't
actually allow the window to change its size.

The user expects to resize the window from its current (maximized) position.
It should not jump to its normal position upon being restored.  So, we set the
window's normal position to its current position before restoring it.
dlls/winemac.drv/cocoa_window.m
dlls/winemac.drv/event.c
dlls/winemac.drv/macdrv.h
dlls/winemac.drv/macdrv_cocoa.h
dlls/winemac.drv/window.c