xserver: Branch 'xorg-server-1.4-apple' - 3 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Thu Sep 4 14:59:25 PDT 2008


 dix/events.c               |    2 ++
 hw/xquartz/darwin.c        |   23 -----------------------
 hw/xquartz/darwinEvents.c  |    4 ++--
 hw/xquartz/xpr/xprCursor.c |   10 ----------
 mi/mipointer.c             |   12 ++++++++++++
 5 files changed, 16 insertions(+), 35 deletions(-)

New commits:
commit c0da576d4921c246a9ac747921b48ab9e718347f
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu Sep 4 14:59:10 2008 -0700

    XQuartz: Don't warp the pointer on server start for XQuartz

diff --git a/dix/events.c b/dix/events.c
index 499a2ac..6458173 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -2338,7 +2338,9 @@ DefineInitialRootWindow(WindowPtr win)
 	pScreen, sprite.current, &sprite.hotLimits, &sprite.physLimits);
     sprite.confined = FALSE;
     (*pScreen->ConstrainCursor) (pScreen, &sprite.physLimits);
+#ifndef ROOTLESS
     (*pScreen->SetCursorPosition) (pScreen, sprite.hot.x, sprite.hot.y, FALSE);
+#endif
     (*pScreen->DisplayCursor) (pScreen, sprite.current);
 
 #ifdef PANORAMIX
diff --git a/hw/xquartz/xpr/xprCursor.c b/hw/xquartz/xpr/xprCursor.c
index df138c7..bb117ad 100644
--- a/hw/xquartz/xpr/xprCursor.c
+++ b/hw/xquartz/xpr/xprCursor.c
@@ -294,16 +294,6 @@ QuartzCrossScreen(ScreenPtr pScreen, Bool entering)
 static void
 QuartzWarpCursor(ScreenPtr pScreen, int x, int y)
 {
-    static Bool neverMoved = TRUE;
-
-    if (neverMoved)
-    {
-        /* Don't move the cursor the first time. This is the
-           jump-to-center initialization, and it's annoying. */
-        neverMoved = FALSE;
-        return;
-    }
-
     if (quartzServerVisible)
     {
         int sx, sy;
commit c1caeb52a442541394c33ba828760ffe5026db86
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu Sep 4 10:00:43 2008 -0700

    XQuartz: Make WarpPointer multithread safe in XQuartz.

diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 135e419..54925cb 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -107,7 +107,7 @@ static pthread_t create_thread(void *func, void *arg) {
     return tid;
 }
 
-static inline void darwinEvents_lock(void) {
+void darwinEvents_lock(void) {
     int err;
     if((err = pthread_mutex_lock(&mieq_lock))) {
         ErrorF("%s:%s:%d: Failed to lock mieq_lock: %d\n",
@@ -119,7 +119,7 @@ static inline void darwinEvents_lock(void) {
     }
 }
 
-static inline void darwinEvents_unlock(void) {
+void darwinEvents_unlock(void) {
     int err;
     if((err = pthread_mutex_unlock(&mieq_lock))) {
         ErrorF("%s:%s:%d: Failed to unlock mieq_lock: %d\n",
diff --git a/mi/mipointer.c b/mi/mipointer.c
index b86a26a..85a6eae 100644
--- a/mi/mipointer.c
+++ b/mi/mipointer.c
@@ -486,6 +486,12 @@ miPointerGetPosition(DeviceIntPtr pDev, int *x, int *y)
     *y = miPointer.y;
 }
 
+#ifdef XQUARTZ
+#include <pthread.h>
+void darwinEvents_lock(void);
+void darwinEvents_unlock(void);
+#endif
+
 void
 miPointerMove (ScreenPtr pScreen, int x, int y, unsigned long time)
 {
@@ -512,6 +518,12 @@ miPointerMove (ScreenPtr pScreen, int x, int y, unsigned long time)
     nevents = GetPointerEvents(events, inputInfo.pointer, MotionNotify, 0,
                                POINTER_ABSOLUTE, 0, 2, valuators);
 
+#ifdef XQUARTZ
+    darwinEvents_lock();
+#endif
     for (i = 0; i < nevents; i++)
         mieqEnqueue(inputInfo.pointer, &events[i]);
+#ifdef XQUARTZ
+    darwinEvents_unlock();
+#endif
 }
commit 2e45344870f5d17181df6407da3448991036d783
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu Sep 4 09:18:40 2008 -0700

    XQuartz: Dead code removal

diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index cb9110a..59d364d 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -319,29 +319,6 @@ static Bool DarwinAddScreen(int index, ScreenPtr pScreen, int argc, char **argv)
  =============================================================================
 */
 
-#if 0
-/*
- * DarwinChangePointerControl
- *  Set mouse acceleration and thresholding
- *  FIXME: We currently ignore the threshold in ctrl->threshold.
- */
-static void DarwinChangePointerControl(
-    DeviceIntPtr    device,
-    PtrCtrl         *ctrl )
-{
-    kern_return_t   kr;
-    double          acceleration;
-
-    if (!darwinMouseAccelChange)
-        return;
-
-    acceleration = ctrl->num / ctrl->den;
-    kr = IOHIDSetMouseAcceleration( darwinParamConnect, acceleration );
-    if (kr != KERN_SUCCESS)
-        ErrorF( "Could not set mouse acceleration with kernel return = 0x%x.\n", kr );
-}
-#endif
-
 /*
  * DarwinMouseProc: Handle the initialization, etc. of a mouse
  */


More information about the xorg-commit mailing list