diff options
| author | Jan Djärv | 2013-10-06 17:53:30 +0200 |
|---|---|---|
| committer | Jan Djärv | 2013-10-06 17:53:30 +0200 |
| commit | 28c760996e94d41321d33b97237e491659516bd0 (patch) | |
| tree | d68cdc7f278d01368cccc5c576f5c2cfc613d087 /src | |
| parent | 9548391ca23cd639f27f0847f2875c4c603012ff (diff) | |
| download | emacs-28c760996e94d41321d33b97237e491659516bd0.tar.gz emacs-28c760996e94d41321d33b97237e491659516bd0.zip | |
* nsterm.m (ns_update_begin): If native fullscreen and no toolbar,
hide toolbar.
(windowDidEnterFullScreen:): If presentation options are zero,
set them here (Bug#15388).
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/nsterm.m | 36 |
2 files changed, 40 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 83ef0f55906..af5dbb8924d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2013-10-06 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * nsterm.m (ns_update_begin): If native fullscreen and no toolbar, | ||
| 4 | hide toolbar (Bug#15388). | ||
| 5 | (windowDidEnterFullScreen:): If presentation options are zero, | ||
| 6 | set them here (Bug#15388). | ||
| 7 | |||
| 1 | 2013-10-05 Xue Fuqiao <xfq.free@gmail.com> | 8 | 2013-10-05 Xue Fuqiao <xfq.free@gmail.com> |
| 2 | 9 | ||
| 3 | * editfns.c (message): Mention batch mode in doc string. | 10 | * editfns.c (message): Mention batch mode in doc string. |
diff --git a/src/nsterm.m b/src/nsterm.m index 4a486aa4018..be660d99e8a 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -673,11 +673,22 @@ ns_update_begin (struct frame *f) | |||
| 673 | external (RIF) call; whole frame, called before update_window_begin | 673 | external (RIF) call; whole frame, called before update_window_begin |
| 674 | -------------------------------------------------------------------------- */ | 674 | -------------------------------------------------------------------------- */ |
| 675 | { | 675 | { |
| 676 | NSView *view = FRAME_NS_VIEW (f); | 676 | EmacsView *view = FRAME_NS_VIEW (f); |
| 677 | NSTRACE (ns_update_begin); | 677 | NSTRACE (ns_update_begin); |
| 678 | 678 | ||
| 679 | ns_update_auto_hide_menu_bar (); | 679 | ns_update_auto_hide_menu_bar (); |
| 680 | 680 | ||
| 681 | #ifdef NS_IMPL_COCOA | ||
| 682 | if ([view isFullscreen] && [view fsIsNative]) | ||
| 683 | { | ||
| 684 | // Fix reappearing tool bar in fullscreen for OSX 10.7 | ||
| 685 | BOOL tbar_visible = FRAME_EXTERNAL_TOOL_BAR (f) ? YES : NO; | ||
| 686 | NSToolbar *toolbar = [FRAME_NS_VIEW (f) toolbar]; | ||
| 687 | if (! tbar_visible != ! [toolbar isVisible]) | ||
| 688 | [toolbar setVisible: tbar_visible]; | ||
| 689 | } | ||
| 690 | #endif | ||
| 691 | |||
| 681 | ns_updating_frame = f; | 692 | ns_updating_frame = f; |
| 682 | [view lockFocus]; | 693 | [view lockFocus]; |
| 683 | 694 | ||
| @@ -6115,8 +6126,27 @@ if (cols > 0 && rows > 0) | |||
| 6115 | [self windowDidBecomeKey:notification]; | 6126 | [self windowDidBecomeKey:notification]; |
| 6116 | [nonfs_window orderOut:self]; | 6127 | [nonfs_window orderOut:self]; |
| 6117 | } | 6128 | } |
| 6118 | else if (! FRAME_EXTERNAL_TOOL_BAR (emacsframe)) | 6129 | else |
| 6119 | [toolbar setVisible:NO]; | 6130 | { |
| 6131 | BOOL tbar_visible = FRAME_EXTERNAL_TOOL_BAR (emacsframe) ? YES : NO; | ||
| 6132 | #ifdef NS_IMPL_COCOA | ||
| 6133 | unsigned val = (unsigned)[NSApp presentationOptions]; | ||
| 6134 | |||
| 6135 | // OSX 10.7 bug fix, the menu won't appear without this. | ||
| 6136 | // val is non-zero on other OSX versions. | ||
| 6137 | if (val == 0) | ||
| 6138 | { | ||
| 6139 | NSApplicationPresentationOptions options | ||
| 6140 | = NSApplicationPresentationAutoHideDock | ||
| 6141 | | NSApplicationPresentationAutoHideMenuBar | ||
| 6142 | | NSApplicationPresentationFullScreen | ||
| 6143 | | NSApplicationPresentationAutoHideToolbar; | ||
| 6144 | |||
| 6145 | [NSApp setPresentationOptions: options]; | ||
| 6146 | } | ||
| 6147 | #endif | ||
| 6148 | [toolbar setVisible:tbar_visible]; | ||
| 6149 | } | ||
| 6120 | } | 6150 | } |
| 6121 | 6151 | ||
| 6122 | - (void)windowWillExitFullScreen:(NSNotification *)notification | 6152 | - (void)windowWillExitFullScreen:(NSNotification *)notification |