[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114539: * nsterm.m (ns_update_begin): If native ful
From: |
Jan D. |
Subject: |
[Emacs-diffs] trunk r114539: * nsterm.m (ns_update_begin): If native fullscreen and no toolbar, |
Date: |
Sun, 06 Oct 2013 15:54:35 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114539
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15388
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Sun 2013-10-06 17:53:30 +0200
message:
* nsterm.m (ns_update_begin): If native fullscreen and no toolbar,
hide toolbar.
(windowDidEnterFullScreen:): If presentation options are zero,
set them here (Bug#15388).
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/nsterm.m nsterm.m-20091113204419-o5vbwnq5f7feedwu-8747
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-10-05 15:06:17 +0000
+++ b/src/ChangeLog 2013-10-06 15:53:30 +0000
@@ -1,3 +1,10 @@
+2013-10-06 Jan Djärv <address@hidden>
+
+ * 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 <address@hidden>
* editfns.c (message): Mention batch mode in doc string.
=== modified file 'src/nsterm.m'
--- a/src/nsterm.m 2013-10-05 14:41:10 +0000
+++ b/src/nsterm.m 2013-10-06 15:53:30 +0000
@@ -673,11 +673,22 @@
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 @@
[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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114539: * nsterm.m (ns_update_begin): If native fullscreen and no toolbar,,
Jan D. <=