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>
This commit is contained in:
parent
ad0ff649c6
commit
1c10b37380
|
@ -54,6 +54,11 @@
|
||||||
#include "damage.h"
|
#include "damage.h"
|
||||||
#endif
|
#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
|
/* 10.4's deferred update makes X slower.. have to live with the tearing
|
||||||
* for now.. */
|
* for now.. */
|
||||||
#define XP_NO_DEFERRED_UPDATES 8
|
#define XP_NO_DEFERRED_UPDATES 8
|
||||||
|
@ -164,9 +169,14 @@ displayScreenBounds(CGDirectDisplayID id)
|
||||||
(int)frame.size.width, (int)frame.size.height,
|
(int)frame.size.width, (int)frame.size.height,
|
||||||
(int)frame.origin.x, (int)frame.origin.y);
|
(int)frame.origin.x, (int)frame.origin.y);
|
||||||
|
|
||||||
/* Remove menubar to help standard X11 window managers. */
|
/* Remove menubar to help standard X11 window managers.
|
||||||
if (XQuartzIsRootless &&
|
* On Mavericks and later, the menu bar is on all displays.
|
||||||
frame.origin.x == 0 && frame.origin.y == 0) {
|
*/
|
||||||
|
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.origin.y += aquaMenuBarHeight;
|
||||||
frame.size.height -= aquaMenuBarHeight;
|
frame.size.height -= aquaMenuBarHeight;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user