I have found a workaround to this problem:

Calling setMenuVisible:NO in an IBAction handler that goes into its own
fullscreen run loop does not work.  The menubar does not go away, and the
fullscreen display doesn't update.

If I add a call to give the main run loop a chance to process events right
after hiding the menu bar, it works:

    [[NSRunLoop currentRunLoop] runUntilDate:[NSDate
dateWithTimeIntervalSinceNow:0.5f]];

This seems somewhat of a kludge. And it seems the method that disables the
main menu is not atomic.

Is there a better way to ensure the menu bar is hidden before entering
fullscreen?

Thanks,

  :: Gavin

On Tue, May 4, 2010 at 1:11 PM, Gavin Baker <gav...@gmail.com> wrote:

>
> So, the obvious solution is to simply hide the menubar before entering
> fullscreen, and re-enable it when leaving fullscreen mode.  However, this
> doesn't quite work.
>
> In the IBAction method to switch to fullscreen, if I call:
>
>     [NSMenu setMenuVisible:NO];
>
> then this change does not come into effect when going into the fullscreen
> run loop, and the same problem occurs.
>
>
-- 
 :: Gavin
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to