+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.
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)
{
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:YES
- screen:[w screen]];
+ screen:screen];
[fw setContentView:[w contentView]];
[fw setTitle:[w title]];
[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];