Kevin Eaves : winemac: Restore the window title when the window style is changed.
Alexandre Julliard
julliard at winehq.org
Fri Jan 10 14:44:52 CST 2014
Module: wine
Branch: stable
Commit: 4a5f5e54b39086f711511c8917830ab90c9bc37a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4a5f5e54b39086f711511c8917830ab90c9bc37a
Author: Kevin Eaves <sevae at roadrunner.com>
Date: Thu Oct 17 01:54:00 2013 -0700
winemac: Restore the window title when the window style is changed.
(cherry picked from commit 771fcd894a62f53cb3862a9d97f28d2ce7c46a30)
---
dlls/winemac.drv/cocoa_window.m | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m
index 2afa223..f4926e2 100644
--- a/dlls/winemac.drv/cocoa_window.m
+++ b/dlls/winemac.drv/cocoa_window.m
@@ -639,6 +639,7 @@ static inline NSUInteger adjusted_modifiers_for_option_behavior(NSUInteger modif
if (newStyle != currentStyle)
{
+ NSString* title = [[[self title] copy] autorelease];
BOOL showingButtons = (currentStyle & (NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask)) != 0;
BOOL shouldShowButtons = (newStyle & (NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask)) != 0;
if (shouldShowButtons != showingButtons && !((newStyle ^ currentStyle) & NSClosableWindowMask))
@@ -652,6 +653,9 @@ static inline NSUInteger adjusted_modifiers_for_option_behavior(NSUInteger modif
}
[self setStyleMask:newStyle];
[self adjustFullScreenBehavior:[self collectionBehavior]];
+
+ if ([[self title] length] == 0 && [title length] > 0)
+ [self setTitle:title];
}
[self adjustFeaturesForState];
More information about the wine-cvs
mailing list