xserver: Branch 'master' - 2 commits

Zephaniah E. Hull warp at kemper.freedesktop.org
Mon Jun 4 03:48:08 PDT 2007


 dix/devices.c                  |    1 +
 hw/xfree86/common/xf86Module.h |    2 +-
 hw/xfree86/common/xf86Xinput.c |   36 +++++++++++++++++++++++-------------
 hw/xfree86/common/xf86Xinput.h |    2 ++
 4 files changed, 27 insertions(+), 14 deletions(-)

New commits:
diff-tree 3f4295e643ca56c40f33af7966e8efd367ef8749 (from a4f3473c88370b8411e016ebab619cffd33e58f9)
Author: Zephaniah E. Hull <warp at agamemnon.b5>
Date:   Mon Jun 4 06:48:06 2007 -0400

    Add xf86PostMotionEventP, takes a pointer instead of a variable number of
    arguments.
    
    Bump input ABI to 1.1 since we export this.

diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index 8e644c4..cdf3d1b 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -85,7 +85,7 @@ typedef enum {
  */
 #define ABI_ANSIC_VERSION	SET_ABI_VERSION(0, 3)
 #define ABI_VIDEODRV_VERSION	SET_ABI_VERSION(2, 0)
-#define ABI_XINPUT_VERSION	SET_ABI_VERSION(1, 0)
+#define ABI_XINPUT_VERSION	SET_ABI_VERSION(1, 1)
 #define ABI_EXTENSION_VERSION	SET_ABI_VERSION(0, 3)
 #define ABI_FONT_VERSION	SET_ABI_VERSION(0, 5)
 
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 7a47276..91e5fec 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -462,25 +462,38 @@ xf86PostMotionEvent(DeviceIntPtr	device,
                     ...)
 {
     va_list var;
+    int i = 0;
+    int *valuators = NULL;
+    
+    valuators = xcalloc(sizeof(int), num_valuators);
+
+    va_start(var, num_valuators);
+    for (i = 0; i < num_valuators; i++)
+        valuators[i] = va_arg(var, int);
+    va_end(var);
+
+    xf86PostMotionEventP(device, is_absolute, first_valuator, num_valuators, valuators);
+    xfree(valuators);
+}
+
+_X_EXPORT void
+xf86PostMotionEventP(DeviceIntPtr	device,
+                    int			is_absolute,
+                    int			first_valuator,
+                    int			num_valuators,
+                    int			*valuators)
+{
     int i = 0, nevents = 0;
     int dx, dy;
     Bool drag = xf86SendDragEvents(device);
-    int *valuators = NULL;
-    int flags = 0;
     xEvent *xE = NULL;
     int index;
+    int flags = 0;
 
     if (is_absolute)
         flags = POINTER_ABSOLUTE;
     else
         flags = POINTER_RELATIVE | POINTER_ACCELERATE;
-    
-    valuators = xcalloc(sizeof(int), num_valuators);
-
-    va_start(var, num_valuators);
-    for (i = 0; i < num_valuators; i++)
-        valuators[i] = va_arg(var, int);
-    va_end(var);
 
 #if XFreeXDGA
     if (first_valuator == 0 && num_valuators >= 2) {
@@ -495,7 +508,7 @@ xf86PostMotionEvent(DeviceIntPtr	device,
                 dy = valuators[1];
             }
             if (DGAStealMotionEvent(index, dx, dy))
-                goto out;
+                return;
         }
     }
 #endif
@@ -517,9 +530,6 @@ xf86PostMotionEvent(DeviceIntPtr	device,
             mieqEnqueue(device, xf86Events + i);
         }
     }
-
-out:
-    xfree(valuators);
 }
 
 _X_EXPORT void
diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h
index 7ef28ed..f882b26 100644
--- a/hw/xfree86/common/xf86Xinput.h
+++ b/hw/xfree86/common/xf86Xinput.h
@@ -163,6 +163,8 @@ extern InputInfoPtr xf86InputDevs;
 void InitExtInput(void);
 void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute,
 			 int first_valuator, int num_valuators, ...);
+void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute,
+			 int first_valuator, int num_valuators, int *valuators);
 void xf86PostProximityEvent(DeviceIntPtr device, int is_in,
 			    int first_valuator, int num_valuators, ...);
 void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, int button,
diff-tree a4f3473c88370b8411e016ebab619cffd33e58f9 (from 0cbc3a4da2ddb6e4f30f60d2bc7f405d31aa554a)
Author: Zephaniah E. Hull <warp at agamemnon.b5>
Date:   Mon Jun 4 06:39:02 2007 -0400

    Fully init the AbsoluteClassRec in InitAbsoluteClassDeviceStruct.
    (Specificly, we were missing the screen field.)

diff --git a/dix/devices.c b/dix/devices.c
index da6e590..6c69454 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -901,6 +901,7 @@ InitAbsoluteClassDeviceStruct(DeviceIntP
     abs->width = -1;
     abs->height = -1;
     abs->following = 0;
+    abs->screen = 0;
 
     dev->absolute = abs;
 


More information about the xorg-commit mailing list