xserver: Branch 'master' - 6 commits

Peter Hutterer whot at kemper.freedesktop.org
Thu Oct 9 23:40:16 PDT 2008


 Xi/exevents.c                  |    2 --
 dix/devices.c                  |    1 -
 hw/kdrive/linux/tslib.c        |    4 ++--
 hw/kdrive/src/kinput.c         |   16 ++++++++++------
 hw/xfree86/common/xf86Xinput.c |    7 ++++---
 hw/xfree86/loader/xf86sym.c    |    2 ++
 6 files changed, 18 insertions(+), 14 deletions(-)

New commits:
commit 4808bdec45775342eb9a6352b41e4919e1a69279
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Thu Oct 9 16:23:24 2008 +1030

    Xi: don't memcpy the KeyClassRec from SD to MD. #16167
    
    Most of its component get copied during CopyKeyClass anyway.
    The ones that aren't:
      postdown - never changed for virtual devices anyway.
      down - shouldn't change that without sending events.
    
    memcpy'ing the struct also copied mapWidth, which means we didn't realloc
    during SetKeySymsMap lateron, overwriting the memory assigned to us.
    
    X.Org Bug 16167 <http://bugs.freedesktop.org/show_bug.cgi?id=16167>

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 6f65279..155cb9b 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -527,8 +527,6 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to)
         oldXkbInfo      = to->key->xkbInfo;
 #endif
 
-        memcpy(to->key, from->key, sizeof(KeyClassRec));
-
         if (!oldMap) /* newly created key struct */
         {
             int bytes = (to->key->curKeySyms.maxKeyCode -
commit 18cdd733ad3dd36fa0a23dfbf18c7d99b86c0276
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Thu Oct 9 17:26:00 2008 +1030

    kdrive: fix dixflags so they're always defined before enqueuing events #17734
    
    If absolute events were posted, dixflags got set conditionally on whether the
    valuators are different from the last posted set of values.
    If dixflags are undefined however, the DIX interprets them as relative
    valuators. Fix this by making sure defining dixflags is always defined.
    
    X.Org Bug 17724 <http://bugs.freedesktop.org/show_bug.cgi?id=17734>

diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index 8a1380f..15fd3b7 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -2105,13 +2105,17 @@ KdEnqueuePointerEvent(KdPointerInfo *pi, unsigned long flags, int rx, int ry,
     if (flags & KD_MOUSE_DELTA)
     {
         if (x || y || z)
+        {
             dixflags = POINTER_RELATIVE | POINTER_ACCELERATE;
-    } else if (x != pi->dixdev->last.valuators[0] ||
-                y != pi->dixdev->last.valuators[1])
-            dixflags = POINTER_ABSOLUTE;
-
-    if (dixflags)
-        _KdEnqueuePointerEvent(pi, MotionNotify, x, y, z, 0, dixflags, FALSE);
+            _KdEnqueuePointerEvent(pi, MotionNotify, x, y, z, 0, dixflags, FALSE);
+        }
+    } else
+    {
+        dixflags = POINTER_ABSOLUTE;
+        if (x != pi->dixdev->last.valuators[0] ||
+            y != pi->dixdev->last.valuators[1])
+            _KdEnqueuePointerEvent(pi, MotionNotify, x, y, z, 0, dixflags, FALSE);
+    }
 
     buttons = flags;
 
commit d58f2c30c64e8b2d8179dac06e0a54be06099da6
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Thu Oct 9 16:50:54 2008 +1030

    kdrive: lastx/y needs to be set to the event coordinates #17728
    
    X.Org Bug 17728 <http://bugs.freedesktop.org/show_bug.cgi?id=17728>

diff --git a/hw/kdrive/linux/tslib.c b/hw/kdrive/linux/tslib.c
index 50cd7cb..e0e860e 100644
--- a/hw/kdrive/linux/tslib.c
+++ b/hw/kdrive/linux/tslib.c
@@ -95,8 +95,8 @@ TsRead (int fd, void *closure)
                     y = event.y - private->lasty;
 	    	}
             }
-            private->lastx = x;
-            private->lasty = y;
+            private->lastx = event.x;
+            private->lasty = event.y;
         } else {
             flags = 0;
             x = private->lastx;
commit decec14219bcd992ec426e202ff3c8681b520b74
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Thu Oct 9 15:10:21 2008 +1030

    dix: silence "unused variable" compiler warning.

diff --git a/dix/devices.c b/dix/devices.c
index 9d4ce34..d19910f 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -1121,7 +1121,6 @@ InitModMap(KeyClassPtr keyc)
 _X_EXPORT Bool
 InitKeyClassDeviceStruct(DeviceIntPtr dev, KeySymsPtr pKeySyms, CARD8 pModifiers[])
 {
-    int i;
     KeyClassPtr keyc;
 
     keyc = xcalloc(1, sizeof(KeyClassRec));
commit 0b4b683f3eeec43536e73be302a4c396fe4d9894
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Tue Oct 7 18:44:42 2008 +1030

    xfree86: export NewInputDeviceRequest/DeleteInputDeviceRequest
    
    NIDR should be used to create a new SD from e.g. within a driver.
    DIDR should be used to remove a device from the server.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at redhat.com>

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 5be0841..8eaa118 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -461,7 +461,7 @@ AddOtherInputDevices()
 {
 }
 
-int
+_X_EXPORT int
 NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev)
 {
     IDevRec *idev = NULL;
@@ -604,7 +604,7 @@ unwind:
     return rval;
 }
 
-void
+_X_EXPORT void
 DeleteInputDeviceRequest(DeviceIntPtr pDev)
 {
     LocalDevicePtr pInfo = (LocalDevicePtr) pDev->public.devicePrivate;
diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
index 1677a49..d0e8558 100644
--- a/hw/xfree86/loader/xf86sym.c
+++ b/hw/xfree86/loader/xf86sym.c
@@ -642,6 +642,8 @@ _X_HIDDEN void *xfree86LookupTab[] = {
     SYMFUNC(xf86ActivateDevice)
     SYMFUNC(xf86XInputSetScreen)
     SYMFUNC(xf86ScaleAxis)
+    SYMFUNC(NewInputDeviceRequest)
+    SYMFUNC(DeleteInputDeviceRequest)
 #ifdef DPMSExtension
     SYMFUNC(DPMSGet)
     SYMFUNC(DPMSSet)
commit 5e213fe1022bf96747834a3ac227929b23136ee6
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Thu Oct 9 11:29:11 2008 +1030

    xfree86: cache dev->isMaster before freeing the device.

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index f8f3577..5be0841 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -611,6 +611,7 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev)
     InputDriverPtr drv;
     IDevRec *idev;
     IDevPtr *it;
+    Bool isMaster = pDev->isMaster;
 
     if (pInfo) /* need to get these before RemoveDevice */
     {
@@ -621,7 +622,7 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev)
     OsBlockSignals();
     RemoveDevice(pDev);
 
-    if (!pDev->isMaster)
+    if (!isMaster)
     {
         if(drv->UnInit)
             drv->UnInit(drv, pInfo, 0);


More information about the xorg-commit mailing list