diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index 240812d16cc..ef4e711aa13 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -641,6 +641,7 @@ - (void) setWindowFeatures:(const struct macdrv_window_features*)wf 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)) @@ -654,6 +655,9 @@ - (void) setWindowFeatures:(const struct macdrv_window_features*)wf } [self setStyleMask:newStyle]; [self adjustFullScreenBehavior:[self collectionBehavior]]; + + if ([[self title] length] == 0 && [title length] > 0) + [self setTitle:title]; } [self adjustFeaturesForState];