Full screen mode animation shows garbage on Mavericks

Originator:jalkut
Number:rdar://15338917 Date Originated:October 29, 2013
Status:Open Resolved:
Product:OS X Product Version:10.9 13A603
Classification:UI/Usability Reproducible:Always
 
NOTE: This is a regression from 10.8.x and affects existing binaries already shipped, including my MarsEdit application. Moving any MarsEdit document window to full-screen mode exhibits the problem.

When a window that is transitioned to Full Screen Mode has both a toolbar installed, and its width constrained by the window:willUseFullScreenContentSize: delegate method, the default full-screen animation is clunky and includes extreme, ugly drawing artifacts.

The gist of the problem appears to be that a version of the original (unconstrained) window target size is zoomed in the transition along with the primary (constrained) window target size. The result is during the transition and until the Full Screen Mode takes full effect, there is a large, low-resolution ghostlike image of the window drawn behind the primary, constrained window.

Screenshot attached to demonstrate what this looks like at the peak of the problem.

Also attached is a sample project to reproduce the problem. In my tests the problem happens with a simple test app that can be reproduced as follows:

1. Create a new Mac application from the basic Xcode template.
2. In the app delegate, add code to install a toolbar on the app's main window, to enable full-screen mode, and to constrain the size of the window in full-screen mode.
3. Run the app and click the "Full Screen" arrows icon in the upper right corner of the window.

Result: See Screenshot.

Expected: The window should zoom to the desired target size without the superfluous, ugly ghosted window image.

Steps to Reproduce:


Expected Results:


Actual Results:


Version:
10.9 13A603

Notes:


Configuration:


Attachments:
'BadTransition.png' and 'ToolbarFullScreenBug.zip' were successfully uploaded.

Comments

For easy reference, this is all the source code required to exhibit the bug from the app delegate of a freshly created Mac Cocoa app in Xcode:

@implementation AppDelegate

  • (void)applicationDidFinishLaunching:(NSNotification *)aNotification { [[self window] setDelegate:self];

    [[self window] setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];

    NSToolbar *toolbar = [[NSToolbar alloc] initWithIdentifier: @"BOOM"]; [[self window] setToolbar: toolbar]; }

  • (NSSize)window:(NSWindow *)window willUseFullScreenContentSize:(NSSize)proposedSize { NSSize constrainedSize = proposedSize; constrainedSize.width = [[window contentView] frame].size.width;

    return constrainedSize; }

@end


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!