• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Full-screen mode broken after upgrading to Yosemite
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Full-screen mode broken after upgrading to Yosemite


  • Subject: Re: Full-screen mode broken after upgrading to Yosemite
  • From: Ken Thomases <email@hidden>
  • Date: Fri, 13 Mar 2015 20:16:19 -0500

On Mar 13, 2015, at 4:29 PM, Daryle Walker <email@hidden> wrote:

> My main browser window supports full-screen and optimized zoom. In Yosemite, those two functions share the green titlebar button. When I activate full-screen mode, with either the green button or the menu item, the window freezes without any visual change. The window can’t be moved or shifted out of the way upon switching apps. (The window doesn’t corrupt other Spaces, though.) The rest of the app still works, but new windows are always beneath the frozen one.
>
> When trying full-screen, this appears on the Xcode debug log:
>
>> 2015-03-13 17:17:18.850 Prairie[7319:1920249] *** Assertion failure in -[PrBrowserController windowWillUseStandardFrame:defaultFrame:], /Users/.../Prairie/PrBrowserController.m:297
>> 2015-03-13 17:17:18.856 Prairie[7319:1920249] An uncaught exception was raised
>> 2015-03-13 17:17:18.857 Prairie[7319:1920249] Standard web-browser window size too tall.

You have an assertion in your code.  The assertion is failing and thus throwing an exception.  Once that happens, stuff is broken.  This is the expected consequence of an assertion failing or an exception being thrown.  The nature of the resulting brokenness is not predictable or diagnostic.


> Why is my optimized-zoom sizing method called during a full-screen adjustment?

Because it's not just for zoom.  It's for computing the standard frame.


> Here’s my zoom sizing method:
>
>> - (NSRect)windowWillUseStandardFrame:(NSWindow *)window defaultFrame:(NSRect)newFrame {
>>    NSParameterAssert(self.window == window);
>>
>>    // Based on the web content, get the maximum desired width and height.
>>    NSView<WebDocumentView> * const  view = self.webView.mainFrame.frameView.documentView;
>>    NSSize const       desiredContentSize = NSMakeSize(NSWidth(view.frame), NSHeight(view.frame) + ((CGFloat)!!self.isLoadingBarVisible * PrLoadingBarHeight) + ((CGFloat)!!self.isStatusBarVisible * PrStatusBarHeight));
>>
>>    // Adjust that desired size to what's actually available.
>>    NSRect  frame = [window contentRectForFrameRect:newFrame];
>>
>>    frame.size.width = MIN(desiredContentSize.width, frame.size.width);
>>    frame.size.height = MIN(desiredContentSize.height, frame.size.height);
>>
>>    // Adjust to the window's size bounds.
>>    frame = [window frameRectForContentRect:frame];
>>    frame.size.width = MAX(window.minSize.width, frame.size.width);
>>    frame.size.height = MAX(window.minSize.height, frame.size.height);
>>    NSAssert(frame.size.width <= newFrame.size.width, @"Standard web-browser window size too wide.");
>>    NSAssert(frame.size.height <= newFrame.size.height, @"Standard web-browser window size too tall.");

Why do you think those are legitimate things to assert?  Have you checked the values involved and the inputs to the computation?

Regards,
Ken


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Full-screen mode broken after upgrading to Yosemite
      • From: Daryle Walker <email@hidden>
References: 
 >Full-screen mode broken after upgrading to Yosemite (From: Daryle Walker <email@hidden>)

  • Prev by Date: Re: Weird crashes on Yosemite
  • Next by Date: Re: Cocoa GUI app getting slower on MacPro or MacMini when disconnecting all screens
  • Previous by thread: Full-screen mode broken after upgrading to Yosemite
  • Next by thread: Re: Full-screen mode broken after upgrading to Yosemite
  • Index(es):
    • Date
    • Thread