diff options
author | Jeremy Huddleston Sequoia <jeremyhu@apple.com> | 2014-05-31 17:45:02 -0700 |
---|---|---|
committer | Jeremy Huddleston Sequoia <jeremyhu@apple.com> | 2014-05-31 17:50:41 -0700 |
commit | 268eb961c9c58fc7cc26e514661b5f8304c1c08f (patch) | |
tree | 99e3b433b7da66afbd44fb55f43cf66c9a4ccdbb | |
parent | 624461797e05da711212329a5c7677df2544fb21 (diff) |
XQuartz: Update logic to account for title bar on every display in Mavericks
<rdar://problem/14205847>
http://xquartz.macosforge.org/trac/ticket/832
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 1c10b37380d228b35db8a8616a6312ac54f5e59b)
-rw-r--r-- | hw/xquartz/xpr/xprScreen.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c index e37601995..7aa1ae1df 100644 --- a/hw/xquartz/xpr/xprScreen.c +++ b/hw/xquartz/xpr/xprScreen.c @@ -54,6 +54,11 @@ #include "damage.h" #endif +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090 +// From NSApplication.h +extern const double NSAppKitVersionNumber; +#endif + /* 10.4's deferred update makes X slower.. have to live with the tearing * for now.. */ #define XP_NO_DEFERRED_UPDATES 8 @@ -164,9 +169,14 @@ 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. */ - if (XQuartzIsRootless && - frame.origin.x == 0 && frame.origin.y == 0) { + /* Remove menubar to help standard X11 window managers. + * On Mavericks and later, the menu bar is on all displays. + */ + if (XQuartzIsRootless +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090 + && (NSAppKitVersionNumber >= 1265 || (frame.origin.x == 0 && frame.origin.y == 0)) +#endif + ) { frame.origin.y += aquaMenuBarHeight; frame.size.height -= aquaMenuBarHeight; } |