[PATCH 1/2] winemac: Allow the user to attempt to resize a maximized window and try to restore it if they do.

Ken Thomases ken at codeweavers.com
Mon Mar 23 18:58:06 CDT 2015


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 | 46 +++++++++++++++++++++++++++++++++--------
dlls/winemac.drv/event.c        |  2 +-
dlls/winemac.drv/macdrv.h       |  2 +-
dlls/winemac.drv/macdrv_cocoa.h |  4 ++++
dlls/winemac.drv/window.c       | 22 +++++++++++++++++++-
5 files changed, 64 insertions(+), 12 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-winemac-Allow-the-user-to-attempt-to-resize-a-maximi.patch
Type: text/x-patch
Size: 6641 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20150323/b3614809/attachment.bin>


More information about the wine-patches mailing list