Commit 029788c7 authored by Jan Djärv's avatar Jan Djärv
Browse files

* nsterm.m (toggleFullScreen:): Hide menubar on secondary monitor

for OSX >= 10.9 if separate spaces are used.
(toggleFullScreen:): Use screen of w instead of fw.

Fixes: debbugs:16659
parent cf8a1938
2014-02-06 Jan Djärv <jan.h.d@swipnet.se>
* nsterm.m (toggleFullScreen:): Hide menubar on secondary monitor
for OSX >= 10.9 if separate spaces are used.
(toggleFullScreen:): Use screen of w instead of fw (Bug#16659).
2014-02-06 Glenn Morris <rgm@gnu.org>
* buffer.c (cache-long-scans): Doc fix.
......
......@@ -6396,6 +6396,14 @@ - (void)toggleFullScreen: (id)sender
if (fs_state != FULLSCREEN_BOTH)
{
NSScreen *screen = [w screen];
#if defined (NS_IMPL_COCOA) && \
MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
/* Hide ghost menu bar on secondary monitor? */
if (! onFirstScreen)
onFirstScreen = [NSScreen screensHaveSeparateSpaces];
#endif
/* Hide dock and menubar if we are on the primary screen. */
if (onFirstScreen)
{
......@@ -6416,7 +6424,7 @@ - (void)toggleFullScreen: (id)sender
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:YES
screen:[w screen]];
screen:screen];
[fw setContentView:[w contentView]];
[fw setTitle:[w title]];
......@@ -6439,7 +6447,7 @@ - (void)toggleFullScreen: (id)sender
[fw makeKeyAndOrderFront:NSApp];
[fw makeFirstResponder:self];
[w orderOut:self];
r = [fw frameRectForContentRect:[[fw screen] frame]];
r = [fw frameRectForContentRect:[screen frame]];
[fw setFrame: r display:YES animate:YES];
[self windowDidEnterFullScreen:nil];
[fw display];
......
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