• Ken Thomases's avatar
    winemac: Queue an event to reassert the WinAPI window position before Cocoa… · 9372af77
    Ken Thomases authored
    winemac: Queue an event to reassert the WinAPI window position before Cocoa adjusts its position for a display change.
    
    When the display mode changes such that the screen height changes, we'd like
    our windows to keep their position relative to the top-left of the primary
    screen.  That's how WinAPI's coordinate system works and we want the WinAPI
    position of the window to not change just because the display mode changed.
    
    Unfortunately that's not achievable in Cocoa.  Cocoa keeps the window
    stationary relative to the screen it's on, not necessarily the primary screen,
    and it's sometimes relative to the bottom-left and sometimes the top-left of
    that screen.
    
    So, what we do instead is queue an event to get the back end to reassert the
    WinAPI position of the window.  This is queued before Cocoa can adjust the
    Cocoa position of the window which would queue a WINDOW_FRAME_CHANGED to the
    back end and mess up the WinAPI position.  The back end's reassertion of the
    WinAPI position won't be processed by the Cocoa thread until after Cocoa has
    adjusted the position and will thus override it.  It will also discard any
    wrong WINDOW_FRAME_CHANGED that may have been queued.
    Signed-off-by: 's avatarKen Thomases <ken@codeweavers.com>
    9372af77
Name
Last commit
Last update
dlls Loading commit data...
documentation Loading commit data...
fonts Loading commit data...
include Loading commit data...
libs Loading commit data...
loader Loading commit data...
po Loading commit data...
programs Loading commit data...
server Loading commit data...
tools Loading commit data...
.mailmap Loading commit data...
ANNOUNCE Loading commit data...
AUTHORS Loading commit data...
COPYING.LIB Loading commit data...
LICENSE Loading commit data...
LICENSE.OLD Loading commit data...
MAINTAINERS Loading commit data...
Make.vars.in Loading commit data...
Makefile.in Loading commit data...
README Loading commit data...
VERSION Loading commit data...
aclocal.m4 Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...