Commit 28c76099 authored by Jan Djärv's avatar Jan Djärv
Browse files

* nsterm.m (ns_update_begin): If native fullscreen and no toolbar,

hide toolbar.
(windowDidEnterFullScreen:): If presentation options are zero,
set them here (Bug#15388).
parent 9548391c
2013-10-06 Jan Djärv <jan.h.d@swipnet.se>
* nsterm.m (ns_update_begin): If native fullscreen and no toolbar,
hide toolbar (Bug#15388).
(windowDidEnterFullScreen:): If presentation options are zero,
set them here (Bug#15388).
2013-10-05 Xue Fuqiao <xfq.free@gmail.com>
* editfns.c (message): Mention batch mode in doc string.
......
......@@ -673,11 +673,22 @@ Free a pool and temporary objects it refers to (callable from C)
external (RIF) call; whole frame, called before update_window_begin
-------------------------------------------------------------------------- */
{
NSView *view = FRAME_NS_VIEW (f);
EmacsView *view = FRAME_NS_VIEW (f);
NSTRACE (ns_update_begin);
ns_update_auto_hide_menu_bar ();
#ifdef NS_IMPL_COCOA
if ([view isFullscreen] && [view fsIsNative])
{
// Fix reappearing tool bar in fullscreen for OSX 10.7
BOOL tbar_visible = FRAME_EXTERNAL_TOOL_BAR (f) ? YES : NO;
NSToolbar *toolbar = [FRAME_NS_VIEW (f) toolbar];
if (! tbar_visible != ! [toolbar isVisible])
[toolbar setVisible: tbar_visible];
}
#endif
ns_updating_frame = f;
[view lockFocus];
......@@ -6115,8 +6126,27 @@ - (void)windowDidEnterFullScreen:(NSNotification *)notification
[self windowDidBecomeKey:notification];
[nonfs_window orderOut:self];
}
else if (! FRAME_EXTERNAL_TOOL_BAR (emacsframe))
[toolbar setVisible:NO];
else
{
BOOL tbar_visible = FRAME_EXTERNAL_TOOL_BAR (emacsframe) ? YES : NO;
#ifdef NS_IMPL_COCOA
unsigned val = (unsigned)[NSApp presentationOptions];
// OSX 10.7 bug fix, the menu won't appear without this.
// val is non-zero on other OSX versions.
if (val == 0)
{
NSApplicationPresentationOptions options
= NSApplicationPresentationAutoHideDock
| NSApplicationPresentationAutoHideMenuBar
| NSApplicationPresentationFullScreen
| NSApplicationPresentationAutoHideToolbar;
[NSApp setPresentationOptions: options];
}
#endif
[toolbar setVisible:tbar_visible];
}
}
- (void)windowWillExitFullScreen:(NSNotification *)notification
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment