mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-24 16:00:05 +01:00
XQuartz: Better support turning off "Displays have separate Spaces" on OS X Mavericks
http://xquartz.macosforge.org/trac/ticket/1876 Follow-up to:1c10b37380Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> (cherry picked from commitab32ee3589)
This commit is contained in:
parent
b7a24467f7
commit
af2e9e3bb1
1 changed files with 17 additions and 6 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue