mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-04-22 07:00:43 +02:00
XQuartz: displayScreenBounds uses quartzEnableRootless rather than !quartzHasRoot
This commit is contained in:
parent
cece293172
commit
c883a78ef0
2 changed files with 12 additions and 6 deletions
|
|
@ -282,9 +282,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;
|
||||
|
|
@ -311,6 +314,9 @@ void QuartzDisplayChangedHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev,
|
|||
}
|
||||
|
||||
void QuartzSetFullscreen(Bool state) {
|
||||
|
||||
DEBUG_LOG("QuartzSetFullscreen: state=%d\n", state);
|
||||
|
||||
if(quartzHasRoot == state)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ displayAtIndex(int index)
|
|||
* Return the bounds of a particular display.
|
||||
*/
|
||||
static CGRect
|
||||
displayScreenBounds(CGDirectDisplayID id, Bool remove_menubar)
|
||||
displayScreenBounds(CGDirectDisplayID id)
|
||||
{
|
||||
CGRect frame;
|
||||
|
||||
|
|
@ -155,7 +155,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;
|
||||
|
|
@ -188,7 +188,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);
|
||||
}
|
||||
|
||||
|
|
@ -206,7 +206,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;
|
||||
|
||||
|
|
@ -332,7 +332,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…
Add table
Reference in a new issue