xserver: Branch 'master' - 2 commits

Peter Hutterer whot at kemper.freedesktop.org
Mon Feb 2 17:15:13 PST 2009


 Xi/setbmap.c |    4 ++++
 dix/events.c |    4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 412e09e1e37b74421abd4dd9606536d2785da440
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Jan 15 11:03:03 2009 +1000

    dix: Use GenericEvent instead of LASTEvent to check for core events.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/dix/events.c b/dix/events.c
index 17e7142..0c8d198 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3256,7 +3256,7 @@ CheckPassiveGrabsOnWindow(
 	tempGrab.modifierDevice = grab->modifierDevice;
         tempGrab.modifiersDetail.exact = xkbi ? xkbi->state.grab_mods : 0;
         /* ignore the device for core events when comparing grabs */
-	if (GrabMatchesSecond(&tempGrab, grab, (xE->u.u.type < LASTEvent)) &&
+	if (GrabMatchesSecond(&tempGrab, grab, (xE->u.u.type < GenericEvent)) &&
 	    (!grab->confineTo ||
 	     (grab->confineTo->realized &&
 				BorderSizeNotEmpty(device, grab->confineTo))))
@@ -3271,7 +3271,7 @@ CheckPassiveGrabsOnWindow(
                Since XGrabDeviceButton requires to specify the
                modifierDevice explicitly, we don't override this choice.
              */
-            if (xE->u.u.type < LASTEvent)
+            if (xE->u.u.type < GenericEvent)
             {
                 grab->device = device;
                 grab->modifierDevice = GetPairedDevice(device);
commit 9f3c5d46f81887b2b413b3e6cc9df8282f06522c
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Mon Feb 2 12:55:39 2009 +1000

    Xi: initialize the device before applying button map changes.
    
    This part got lost in bc909f71367a0.
    Reported by Tomas Carnecky.
    
    Acked-by: Daniel Stone <daniel at fooishbar.org>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/Xi/setbmap.c b/Xi/setbmap.c
index b6f62dd..f29389d 100644
--- a/Xi/setbmap.c
+++ b/Xi/setbmap.c
@@ -101,6 +101,10 @@ ProcXSetDeviceButtonMapping(ClientPtr client)
 			  stuff->map_length + 3) >> 2)
 	return BadLength;
 
+    ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
+    if (ret != Success)
+        return ret;
+
     rep.repType = X_Reply;
     rep.RepType = X_SetDeviceButtonMapping;
     rep.length = 0;


More information about the xorg-commit mailing list