XQuartz: displayScreenBounds uses quartzEnableRootless rather than !quartzHasRoot
(cherry picked from commit c883a78ef0
)
This commit is contained in:
parent
4e762b8aa3
commit
ecd55bc859
|
@ -274,9 +274,12 @@ static void QuartzUpdateScreens(void) {
|
|||
pRoot = WindowTable[pScreen->myNum];
|
||||
AppleWMSetScreenOrigin(pRoot);
|
||||
pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL);
|
||||
//pScreen->PaintWindowBackground (pRoot, &pRoot->borderClip, PW_BACKGROUND);
|
||||
miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
|
||||
DefineInitialRootWindow(pRoot);
|
||||
|
||||
|
||||
DEBUG_LOG("Root Window: %dx%d @ (%d, %d) darwinMainScreen (%d, %d) xy (%d, %d) dixScreenOrigins (%d, %d)\n", width, height, x - sx, y - sy, darwinMainScreenX, darwinMainScreenY, x, y, dixScreenOrigins[pScreen->myNum].x, dixScreenOrigins[pScreen->myNum].y);
|
||||
|
||||
/* Send an event for the root reconfigure */
|
||||
e.u.u.type = ConfigureNotify;
|
||||
e.u.configureNotify.window = pRoot->drawable.id;
|
||||
|
@ -303,6 +306,9 @@ void QuartzDisplayChangedHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev,
|
|||
}
|
||||
|
||||
void QuartzSetFullscreen(Bool state) {
|
||||
|
||||
DEBUG_LOG("QuartzSetFullscreen: state=%d\n", state);
|
||||
|
||||
if(quartzHasRoot == state)
|
||||
return;
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ displayAtIndex(int index)
|
|||
* Return the bounds of a particular display.
|
||||
*/
|
||||
static CGRect
|
||||
displayScreenBounds(CGDirectDisplayID id, Bool remove_menubar)
|
||||
displayScreenBounds(CGDirectDisplayID id)
|
||||
{
|
||||
CGRect frame;
|
||||
|
||||
|
@ -153,7 +153,7 @@ displayScreenBounds(CGDirectDisplayID id, Bool remove_menubar)
|
|||
(int)frame.origin.x, (int)frame.origin.y);
|
||||
|
||||
/* Remove menubar to help standard X11 window managers. */
|
||||
if (remove_menubar && !quartzHasRoot &&
|
||||
if (quartzEnableRootless &&
|
||||
frame.origin.x == 0 && frame.origin.y == 0) {
|
||||
frame.origin.y += aquaMenuBarHeight;
|
||||
frame.size.height -= aquaMenuBarHeight;
|
||||
|
@ -186,7 +186,7 @@ xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height)
|
|||
/* Get the union of all screens */
|
||||
for (i = 0; i < displayCount; i++) {
|
||||
CGDirectDisplayID dpy = displayList[i];
|
||||
frame = displayScreenBounds(dpy, TRUE);
|
||||
frame = displayScreenBounds(dpy);
|
||||
unionRect = CGRectUnion(unionRect, frame);
|
||||
}
|
||||
|
||||
|
@ -204,7 +204,7 @@ xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height)
|
|||
{
|
||||
CGDirectDisplayID dpy = displayList[i];
|
||||
|
||||
frame = displayScreenBounds(dpy, TRUE);
|
||||
frame = displayScreenBounds(dpy);
|
||||
frame.origin.x -= unionRect.origin.x;
|
||||
frame.origin.y -= unionRect.origin.y;
|
||||
|
||||
|
@ -328,7 +328,7 @@ xprAddScreen(int index, ScreenPtr pScreen)
|
|||
|
||||
dpy = displayAtIndex(index);
|
||||
|
||||
frame = displayScreenBounds(dpy, TRUE);
|
||||
frame = displayScreenBounds(dpy);
|
||||
|
||||
dfb->x = frame.origin.x;
|
||||
dfb->y = frame.origin.y;
|
||||
|
|
Loading…
Reference in New Issue
Block a user