diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c index 7aa1ae1dfad4040a5161ad192150f81a27844eb5..d0a525ff4664054a69df598409fcd8ea812405d4 100644 --- a/hw/xquartz/xpr/xprScreen.c +++ b/hw/xquartz/xpr/xprScreen.c @@ -169,14 +169,25 @@ displayScreenBounds(CGDirectDisplayID id) (int)frame.size.width, (int)frame.size.height, (int)frame.origin.x, (int)frame.origin.y); - /* Remove menubar to help standard X11 window managers. - * On Mavericks and later, the menu bar is on all displays. - */ - if (XQuartzIsRootless + Boolean spacePerDisplay = false; #if MAC_OS_X_VERSION_MIN_REQUIRED < 1090 - && (NSAppKitVersionNumber >= 1265 || (frame.origin.x == 0 && frame.origin.y == 0)) + if (NSAppKitVersionNumber >= 1265) #endif - ) { + { + Boolean ok; + (void)CFPreferencesAppSynchronize(CFSTR("com.apple.spaces")); + spacePerDisplay = ! CFPreferencesGetAppBooleanValue(CFSTR("spans-displays"), + CFSTR("com.apple.spaces"), + &ok); + if (!ok) + spacePerDisplay = true; + } + + /* Remove menubar to help standard X11 window managers. + * On Mavericks and later, the menu bar is on all displays when spans-displays is false or unset. + */ + if (XQuartzIsRootless && + (spacePerDisplay || (frame.origin.x == 0 && frame.origin.y == 0))) { frame.origin.y += aquaMenuBarHeight; frame.size.height -= aquaMenuBarHeight; } diff --git a/os/connection.c b/os/connection.c index 40d9ff39b8290276196e94e5b16d83a0e1e1dcd7..f915e1295ca46105776ac0ca5192d386287bc432 100644 --- a/os/connection.c +++ b/os/connection.c @@ -1307,13 +1307,6 @@ ListenOnOpenFD(int fd, int noxauth) /* Increment the count */ ListenTransCount++; - - /* This *might* not be needed... /shrug */ - ResetAuthorization(); - ResetHosts(display); -#ifdef XDMCP - XdmcpReset(); -#endif } /* based on TRANS(SocketUNIXAccept) (XtransConnInfo ciptr, int *status) */