winemac: Prevent maximized windows from entering Cocoa full-screen mode.
commit14a0fc3cccc682796d3788f19f6195f1a9530852
authorKen Thomases <ken@codeweavers.com>
Thu, 12 Mar 2015 23:45:25 +0000 (12 18:45 -0500)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 13 Mar 2015 12:52:14 +0000 (13 21:52 +0900)
treea75a365f5317296cf9a6eeb15a8b0a6cacfcf6ef
parent4af5d5bd99737345a1a6452da1e8fefe909f8bc6
winemac: Prevent maximized windows from entering Cocoa full-screen mode.

OS X doesn't really have the concept of windows being maximized; that is, being
in a mode where they can't be moved or resized.  As a consequence, it doesn't
have a button in the window title bar to restore a maximized window to normal.
So, when a Wine window is maximized, the Mac driver hijacks the green zoom
button to act as a restore button.  (When a window is zoomed, the green button
"unzooms" back to its last user size and position, so it's analogous.)

However, with OS X 10.10 (Yosemite), the green button prefers to act as a
toggle for the Cocoa full-screen mode rather than zooming and unzooming.  This
made it difficult for users to restore a maximized window.  They would have to
Option-click the green button, double-click the title bar, or choose Zoom
from the Window menu, none of which is obvious.

The fix is to disable Cocoa full-screen mode for maximized windows.  Then, the
green button reverts to unzoom and restoring the window.
dlls/winemac.drv/cocoa_window.m