Ken Thomases : winemac: Order front in -makeKeyAndOrderFront:; we only override to control key status.
Alexandre Julliard
julliard at winehq.org
Fri May 17 14:24:34 CDT 2013
Module: wine
Branch: master
Commit: c8d4b1cc5e9d69a8dc0e6150d768fc2b02b5ad6a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c8d4b1cc5e9d69a8dc0e6150d768fc2b02b5ad6a
Author: Ken Thomases <ken at codeweavers.com>
Date: Thu May 16 18:43:50 2013 -0500
winemac: Order front in -makeKeyAndOrderFront:; we only override to control key status.
When we have windows on two different spaces and the user switches between them by
clicking our Dock icon, Cocoa inexplicably sends the switched-to window to the
back of the z-order. It's only -makeKeyAndOrderFront: that brings it forward
again, but our override broke that.
---
dlls/winemac.drv/cocoa_window.m | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m
index cec86b5..d2b2547 100644
--- a/dlls/winemac.drv/cocoa_window.m
+++ b/dlls/winemac.drv/cocoa_window.m
@@ -1051,8 +1051,16 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
/* We don't call this. It's the action method of the items in the Window menu. */
- (void) makeKeyAndOrderFront:(id)sender
{
+ WineApplicationController* controller = [WineApplicationController sharedController];
+ WineWindow* front = [controller frontWineWindow];
+
if (![self isKeyWindow] && !self.disabled && !self.noActivate)
- [[WineApplicationController sharedController] windowGotFocus:self];
+ [controller windowGotFocus:self];
+
+ if (front && [self level] < [front level])
+ [self setLevel:[front level]];
+ [self orderFront:nil];
+ [controller adjustWindowLevels];
}
- (void) sendEvent:(NSEvent*)event
More information about the wine-cvs
mailing list