winemac: More thoroughly discard events which have been obsoleted by subsequent Wine...
commit4f9de6bcdf1722a258413ce99c26f2ee5b36dbf2
authorKen Thomases <ken@codeweavers.com>
Tue, 31 Dec 2013 07:05:18 +0000 (31 01:05 -0600)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 31 Dec 2013 11:31:39 +0000 (31 12:31 +0100)
tree0ac8d884e3c66f65168f56d1c19584fe722eae8e
parent94cfa7799bac562a82ef9f403be93fce73519520
winemac: More thoroughly discard events which have been obsoleted by subsequent Wine- or program-driven changes.

Among other things, this fixes Syberia 2.  That game shows, hides, and then
shows its window.  Hiding it caused a WINDOW_LOST_FOCUS event to be queued.
By the time it was processed, the window was the foreground window again.
In response to being told it had lost focus, the game minimized its window.

Hiding the window should have prevented or discarded the WINDOW_LOST_FOCUS
event since the change was driven from Wine and the Win32 foreground/active
window state would already be correct.  In addition, when the program
re-showed its window and made it foreground, that should have discarded the
event as being out of date.  Now they do.
dlls/winemac.drv/cocoa_app.m
dlls/winemac.drv/cocoa_event.m
dlls/winemac.drv/cocoa_window.m