Ken Thomases : winemac: Don't change window order for SetFocus().

Alexandre Julliard julliard at winehq.org
Thu Dec 12 12:48:07 CST 2013


Module: wine
Branch: master
Commit: e3dd277586df23e1940b30a8c2b39ff496094fe8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e3dd277586df23e1940b30a8c2b39ff496094fe8

Author: Ken Thomases <ken at codeweavers.com>
Date:   Wed Dec 11 12:50:17 2013 -0600

winemac: Don't change window order for SetFocus().

This fixes a problem where some apps move their window to the front after
the user switches away to another app.  OS X prevents the background app
from actually coming in front of the active app's front window, but the
window gets ordered in second place, possibly obscuring other windows of the
active app.

---

 dlls/winemac.drv/cocoa_window.m |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m
index 6fa6ee8..06647d9 100644
--- a/dlls/winemac.drv/cocoa_window.m
+++ b/dlls/winemac.drv/cocoa_window.m
@@ -1340,7 +1340,11 @@ static inline NSUInteger adjusted_modifiers_for_option_behavior(NSUInteger modif
 
     - (void) makeFocused:(BOOL)activate
     {
-        [self orderBelow:nil orAbove:nil activate:activate];
+        if (activate)
+        {
+            [[WineApplicationController sharedController] transformProcessToForeground];
+            [NSApp activateIgnoringOtherApps:YES];
+        }
 
         causing_becomeKeyWindow = self;
         [self makeKeyWindow];




More information about the wine-cvs mailing list