xserver: Branch 'master' - 2 commits

Brian Paul brianp at kemper.freedesktop.org
Mon Apr 2 21:29:39 EEST 2007


 hw/dmx/input/dmxbackend.c |    9 ++++++---
 hw/dmx/input/dmxevents.c  |   16 ++++------------
 2 files changed, 10 insertions(+), 15 deletions(-)

New commits:
diff-tree 08a88d1803f672555141011e082fbc0edeedcf05 (from 70683e338dacc48e3adf489d66ec33b29dfc3b77)
Author: Brian <brian at yutani.localnet.net>
Date:   Mon Apr 2 12:28:14 2007 -0600

    Pass num_valuators=0 for ButtonPress/Release. This seems to fix the button coordinate problem

diff --git a/hw/dmx/input/dmxevents.c b/hw/dmx/input/dmxevents.c
index fae2049..d174a59 100644
--- a/hw/dmx/input/dmxevents.c
+++ b/hw/dmx/input/dmxevents.c
@@ -799,20 +799,12 @@ void dmxEnqueue(DevicePtr pDev, int type
            DeviceIntPtr p = dmxLocal->pDevice;
            int i, nevents, valuators[3];
            xEvent *events = Xcalloc(sizeof(xEvent), GetMaximumEventsNum());
-
-           valuators[0] = e->xbutton.x;
-           valuators[1] = e->xbutton.y;
-           /*
-           valuators[0] = dmxGlobalX;
-           valuators[1] = dmxGlobalY;
-           */
            valuators[2] = e->xbutton.button;
-           nevents = GetPointerEvents(events,
-                                      /*pDev*/p,
-                                      /*KeyPress*/type,
-                                      detail,
+           nevents = GetPointerEvents(events, p, type, detail,
                                       POINTER_ABSOLUTE,
-                                      0, 2/*3*/, valuators);
+                                      0,   /* first_valuator = 0 */
+                                      0,   /* num_valuators = 0 */
+                                      valuators);
 
            ErrorF("BUTTON %d, %d %d  n=%d\n",
                   valuators[0], valuators[1], valuators[2], nevents);
diff-tree 70683e338dacc48e3adf489d66ec33b29dfc3b77 (from f2808005f4ee72c5fd7f5f3dcca181306485113e)
Author: Brian <brian at yutani.localnet.net>
Date:   Mon Apr 2 12:26:27 2007 -0600

    formatting fixes

diff --git a/hw/dmx/input/dmxbackend.c b/hw/dmx/input/dmxbackend.c
index 7efb2ee..09a2a32 100644
--- a/hw/dmx/input/dmxbackend.c
+++ b/hw/dmx/input/dmxbackend.c
@@ -358,7 +358,8 @@ void dmxBackendCollectEvents(DevicePtr p
 	switch (X.type) {
         case EnterNotify:
             dmxCommonSaveState(priv);
-            if (entered++) continue;
+            if (entered++)
+                continue;
             priv->entered = 1;
             ignoreLeave   = 1;
             DMXDBG5("dmxBackendCollectEvents: Enter %lu %d,%d; GRAB %s %p\n",
@@ -382,7 +383,8 @@ void dmxBackendCollectEvents(DevicePtr p
                 continue;
             }
             dmxCommonRestoreState(priv);
-            if (left++) continue;
+            if (left++)
+                continue;
             DMXDBG7("dmxBackendCollectEvents: Leave %lu %d,%d %d %d %s %s\n",
                     X.xcrossing.root, X.xcrossing.x, X.xcrossing.y,
                     X.xcrossing.detail, X.xcrossing.focus,
@@ -403,7 +405,8 @@ void dmxBackendCollectEvents(DevicePtr p
                     priv->newscreen,
                     X.xmotion.x, X.xmotion.y,
                     entered, priv->lastX, priv->lastY);
-            if (dmxBackendPendingMotionEvent(priv, TRUE)) continue;
+            if (dmxBackendPendingMotionEvent(priv, TRUE))
+                continue;
             if (!(dmxScreen = dmxBackendFindWindow(priv, X.xmotion.window)))
                 dmxLog(dmxFatal,
                        "   Event on non-existant window %lu\n",



More information about the xorg-commit mailing list