Ken Thomases : winemac: Make the window' s contentView its firstResponder again after changing its style.
Alexandre Julliard
julliard at winehq.org
Tue Mar 11 14:45:40 CDT 2014
Module: wine
Branch: master
Commit: 06f80d6542222df7c894695b703c2d74c125608d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=06f80d6542222df7c894695b703c2d74c125608d
Author: Ken Thomases <ken at codeweavers.com>
Date: Mon Mar 10 18:23:17 2014 -0500
winemac: Make the window's contentView its firstResponder again after changing its style.
---
dlls/winemac.drv/cocoa_window.m | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m
index 54cb8db..7ead126 100644
--- a/dlls/winemac.drv/cocoa_window.m
+++ b/dlls/winemac.drv/cocoa_window.m
@@ -713,6 +713,12 @@ static inline NSUInteger adjusted_modifiers_for_option_behavior(NSUInteger modif
[self setStyleMask:newStyle ^ NSClosableWindowMask];
}
[self setStyleMask:newStyle];
+
+ // -setStyleMask: resets the firstResponder to the window. Set it
+ // back to the content view.
+ if ([[self contentView] acceptsFirstResponder])
+ [self makeFirstResponder:[self contentView]];
+
[self adjustFullScreenBehavior:[self collectionBehavior]];
if ([[self title] length] == 0 && [title length] > 0)
More information about the wine-cvs
mailing list