XQuartz: Don't map the menu bar to the screen area.

(cherry picked from commit 1115917ada)
This commit is contained in:
Jeremy Huddleston 2008-10-31 12:55:46 -07:00
parent 31907986a6
commit 93298c7f8f
2 changed files with 10 additions and 10 deletions

View File

@ -376,7 +376,13 @@ static void DarwinPrepareValuators(int *valuators, ScreenPtr screen,
/* Fix offset between darwin and X screens */
pointer_x -= darwinMainScreenX + dixScreenOrigins[screen->myNum].x;
pointer_y -= darwinMainScreenY + dixScreenOrigins[screen->myNum].y;
if(pointer_x < 0.0)
pointer_x = 0.0;
if(pointer_y < 0.0)
pointer_y = 0.0;
/* Setup our array of values */
valuators[0] = pointer_x * XQUARTZ_VALUATOR_LIMIT / (float)screenInfo.screens[0]->width;
valuators[1] = pointer_y * XQUARTZ_VALUATOR_LIMIT / (float)screenInfo.screens[0]->height;
@ -384,7 +390,7 @@ static void DarwinPrepareValuators(int *valuators, ScreenPtr screen,
valuators[3] = tilt_x * XQUARTZ_VALUATOR_LIMIT;
valuators[4] = tilt_y * XQUARTZ_VALUATOR_LIMIT;
DEBUG_LOG("Valuators: {%d,%d,%d,%d,%d}\n",
DEBUG_LOG("Pointer (%f, %f), Valuators: {%d,%d,%d,%d,%d}\n", pointer_x, pointer_y,
valuators[0], valuators[1], valuators[2], valuators[3], valuators[4]);
}

View File

@ -184,15 +184,9 @@ xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height)
CGGetActiveDisplayList(displayCount, displayList, &displayCount);
/* Get the union of all screens */
for (i = 0; i < displayCount; i++)
{
/* we can't remove the menubar from the screen - doing so
* would constrain the pointer to the screen, not allowing it
* to reach the menubar..
*/
for (i = 0; i < displayCount; i++) {
CGDirectDisplayID dpy = displayList[i];
frame = displayScreenBounds(dpy, FALSE);
frame = displayScreenBounds(dpy, TRUE);
unionRect = CGRectUnion(unionRect, frame);
}