winemac: When programmatically focusing a window, don't generate WINDOW_LOST_FOCUS...
commitdb1d0192027d3e3a7f0e30b08747b65b1b970e8a
authorKen Thomases <ken@codeweavers.com>
Wed, 25 Sep 2013 20:10:57 +0000 (25 15:10 -0500)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 15 Nov 2013 13:12:02 +0000 (15 14:12 +0100)
tree7c7d6d0a1b7ff109655f76b38b4f5585a9dc6a4b
parent8aeb1059723fc4a366256237b6795cbbd7548610
winemac: When programmatically focusing a window, don't generate WINDOW_LOST_FOCUS event for previously focused window.

That event can confuse things if the program switches focus from A to B and
then back to A and then processes events.  It will get an event saying that
A lost focus in Cocoa, check that A does indeed have current focus in Wine,
and so switch focus away from it (to the desktop window).  (It then gets an
event that B lost focus, but that does nothing at that point.)

(cherry picked from commit 4e0e9ca84a89d1ac2b548ee4a6224b764af2d23d)
dlls/winemac.drv/cocoa_window.h
dlls/winemac.drv/cocoa_window.m