[PATCH 2/2] winemac: Restore a maximized window if a user tries to move it by dragging its title bar.

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


OS X doesn't have the same concept of maximized windows as Windows does.
There's no mode that prevents a normally-movable window from being moved.  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 move a window that's maximized.

To get similar behavior while still respecting Win32 semantics, we detect when
the user tries to move a maximized window.  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 move.

The user expects to move 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_app.h    |   2 +
dlls/winemac.drv/cocoa_app.m    |   9 +++
dlls/winemac.drv/cocoa_window.h |   4 ++
dlls/winemac.drv/cocoa_window.m | 129 +++++++++++++++++++++++++++++++++++++---
4 files changed, 135 insertions(+), 9 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-winemac-Restore-a-maximized-window-if-a-user-tries-t.patch
Type: text/x-patch
Size: 8516 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20150323/6d71c519/attachment.bin>


More information about the wine-patches mailing list