xserver: Branch 'xorg-server-1.4-apple' - 3 commits
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Fri Oct 31 13:00:59 PDT 2008
hw/xquartz/X11Application.m | 12 +++++-------
hw/xquartz/darwinEvents.c | 16 +++++++++++-----
hw/xquartz/xpr/xprScreen.c | 10 ++--------
3 files changed, 18 insertions(+), 20 deletions(-)
New commits:
commit 9ca099e928653b5a0fb745186e17bfcc3d74ccc0
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Fri Oct 31 13:00:01 2008 -0700
XQuartz: Silence pointer debug spam
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index dcba77f..473ec22 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -187,7 +187,7 @@ static void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, in
TA_SERVER();
- DEBUG_LOG("DarwinEventHandler(%d, %p, %p, %d)\n", screenNum, xe, dev, nevents);
+// DEBUG_LOG("DarwinEventHandler(%d, %p, %p, %d)\n", screenNum, xe, dev, nevents);
for (i=0; i<nevents; i++) {
switch(xe[i].u.u.type) {
case kXquartzControllerNotify:
@@ -391,8 +391,8 @@ static void DarwinPrepareValuators(int *valuators, ScreenPtr screen,
valuators[3] = tilt_x * XQUARTZ_VALUATOR_LIMIT;
valuators[4] = tilt_y * XQUARTZ_VALUATOR_LIMIT;
- 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]);
+ //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]);
}
void DarwinSendPointerEvents(DeviceIntPtr pDev, int ev_type, int ev_button, float pointer_x, float pointer_y,
@@ -402,7 +402,7 @@ void DarwinSendPointerEvents(DeviceIntPtr pDev, int ev_type, int ev_button, floa
ScreenPtr screen;
int valuators[5];
- DEBUG_LOG("x=%f, y=%f, p=%f, tx=%f, ty=%f\n", pointer_x, pointer_y, pressure, tilt_x, tilt_y);
+ //DEBUG_LOG("x=%f, y=%f, p=%f, tx=%f, ty=%f\n", pointer_x, pointer_y, pressure, tilt_x, tilt_y);
if(!darwinEvents) {
DEBUG_LOG("DarwinSendPointerEvents called before darwinEvents was initialized\n");
commit 1115917ada127a1cd6a8b61efe7fd134e2ea85fd
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Fri Oct 31 12:55:46 2008 -0700
XQuartz: Don't map the menu bar to the screen area.
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 1801f75..dcba77f 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -377,7 +377,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;
@@ -385,7 +391,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]);
}
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 3a7bf2c..0414655 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -186,15 +186,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);
}
commit 5fc73b1141eca8b678e54412ca33afa31a76d088
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Fri Oct 31 12:37:32 2008 -0700
XQuartz: Fixed Xplugin thread safety issues, so rea-enable background window check
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 766fe13..62e00f1 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -948,23 +948,21 @@ extern int darwin_modifier_flags; // darwinEvents.c
pDev = darwinTabletCurrent;
}
-#if 0 // XPlugin isn't thread safe ... sigh
if(!quartzServerVisible) {
xp_window_id wid;
-
+
/* Sigh. Need to check that we're really over one of
* our windows. (We need to receive pointer events while
- * not in the foreground, and the only way to do that
- * right now is to ask for _all_ pointer events..)
+ * not in the foreground, but we don't want to receive them
+ * when another window is over us or we might show a tooltip)
*/
wid = 0;
- xp_find_window(pointer_x, pointer_y, 0, &wid);
- if (wid == 0)
+ if (xp_find_window(pointer_x, pointer_y, 0, &wid) == XP_Success &&
+ wid == 0)
return;
}
-#endif
DarwinSendPointerEvents(pDev, ev_type, ev_button, pointer_x, pointer_y,
pressure, tilt_x, tilt_y);
More information about the xorg-commit
mailing list