xserver: Branch 'server-1.11-branch' - 7 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Fri Oct 14 01:16:58 PDT 2011


 config/udev.c |    2 +-
 dix/events.c  |   25 ++++++++++++++++---------
 dix/grabs.c   |    2 +-
 test/input.c  |    2 +-
 xkb/xkb.c     |    3 +++
 5 files changed, 22 insertions(+), 12 deletions(-)

New commits:
commit bbe6a69da398dba93679c23c3c50f9916cb562ca
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Jul 29 16:33:54 2011 +1000

    dix: don't XWarpPointer through the last slave anymore (#38313)
    
    This line was introduced pre-1.6 to fix Bug 19297. The effect of warping
    through the VCP then was that if a device had custom valuator ranges, the
    warp position would be wrong. The better device for this effect is the the
    XTest device.
    
    This fixes a server crash where the lastSlave is a pointer device without
    valuators (Bug 38313#0).
    
    And while we're at it, make sure the Xinerama code-path does the same.
    
    X.Org Bug 38313 <http://bugs.freedesktop.org/show_bug.cgi?id=38313>
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Daniel Stone <daniel at fooishbar.org>
    (cherry picked from commit 2bfb802839688ecf328119c4c6979390fc60348d)

diff --git a/dix/events.c b/dix/events.c
index 8e7f9c3..8068fc7 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3351,16 +3351,21 @@ XineramaWarpPointer(ClientPtr client)
 {
     WindowPtr	dest = NULL;
     int		x, y, rc;
-    SpritePtr   pSprite = PickPointer(client)->spriteInfo->sprite;
+    DeviceIntPtr dev;
+    SpritePtr   pSprite;
 
     REQUEST(xWarpPointerReq);
 
-
     if (stuff->dstWid != None) {
 	rc = dixLookupWindow(&dest, stuff->dstWid, client, DixReadAccess);
 	if (rc != Success)
 	    return rc;
     }
+
+    /* Post through the XTest device */
+    dev = PickPointer(client);
+    dev = GetXTestDevice(dev);
+    pSprite = dev->spriteInfo->sprite;
     x = pSprite->hotPhys.x;
     y = pSprite->hotPhys.y;
 
@@ -3410,9 +3415,9 @@ XineramaWarpPointer(ClientPtr client)
     else if (y >= pSprite->physLimits.y2)
 	y = pSprite->physLimits.y2 - 1;
     if (pSprite->hotShape)
-	ConfineToShape(PickPointer(client), pSprite->hotShape, &x, &y);
+	ConfineToShape(dev, pSprite->hotShape, &x, &y);
 
-    XineramaSetCursorPosition(PickPointer(client), x, y, TRUE);
+    XineramaSetCursorPosition(dev, x, y, TRUE);
 
     return Success;
 }
@@ -3430,7 +3435,7 @@ ProcWarpPointer(ClientPtr client)
     WindowPtr	dest = NULL;
     int		x, y, rc;
     ScreenPtr	newScreen;
-    DeviceIntPtr dev, tmp;
+    DeviceIntPtr dev, tmp, xtest_dev = NULL;
     SpritePtr   pSprite;
 
     REQUEST(xWarpPointerReq);
@@ -3443,11 +3448,13 @@ ProcWarpPointer(ClientPtr client)
 	    rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixWriteAccess);
 	    if (rc != Success)
 		return rc;
+            if (IsXTestDevice(tmp, dev))
+                xtest_dev = tmp;
 	}
     }
 
-    if (dev->lastSlave)
-        dev = dev->lastSlave;
+    /* Use the XTest device to actually move the pointer */
+    dev = xtest_dev;
     pSprite = dev->spriteInfo->sprite;
 
 #ifdef PANORAMIX
commit 2e28ff155ffc30707d42d885d5f6fc891bc82252
Author: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
Date:   Tue Aug 9 11:00:34 2011 +0900

    Disable check of double-aligned in test/input.c on Renesas SH
    
    Renesas SH is not aligned at size of double.
    When structure has double value, It is aligned in 4byte (long).
    
    Signed-off-by: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    (cherry picked from commit b29ce0726d55ec41cfbce0814e21b0217ef64efe)

diff --git a/test/input.c b/test/input.c
index 837ce49..6a0c523 100644
--- a/test/input.c
+++ b/test/input.c
@@ -1223,7 +1223,7 @@ static void dix_valuator_alloc(void)
 
         assert(v);
         assert(v->numAxes == num_axes);
-#ifndef __i386__
+#if !defined(__i386__) && !defined(__sh__)
         /* must be double-aligned on 64 bit */
         assert(((void*)v->axisVal - (void*)v) % sizeof(double) == 0);
         assert(((void*)v->axes - (void*)v) % sizeof(double) == 0);
commit 79ac611d3121801c34f111c91b5ace5769719695
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Mon Aug 1 14:12:41 2011 +1000

    dix: don't use the pointer as modifier device in UngrabKey.
    
    Modifier device is always the keyboard.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Daniel Stone <daniel at fooishbar.org>
    (cherry picked from commit 8c5a4d6fbecf79f2dc4f2d836d741203b2d5e856)

diff --git a/dix/events.c b/dix/events.c
index 89f6810..8e7f9c3 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -5372,7 +5372,7 @@ ProcUngrabKey(ClientPtr client)
     tempGrab.window = pWin;
     tempGrab.modifiersDetail.exact = stuff->modifiers;
     tempGrab.modifiersDetail.pMask = NULL;
-    tempGrab.modifierDevice = GetPairedDevice(keybd);
+    tempGrab.modifierDevice = keybd;
     tempGrab.type = KeyPress;
     tempGrab.grabtype = GRABTYPE_CORE;
     tempGrab.detail.exact = stuff->key;
commit 843737b4f979fed3a6d74cdfc7047ce5ca886639
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Jul 28 15:56:08 2011 +1000

    dix: ignore devices when adding passive core grabs to list (#39545)
    
    Passive core grabs are mostly device-independent. In an MPX scenario, they
    may change to reflect whichever master pair activated the grab last. For
    adding new grabs to the list, ignore the device for core grabs to return
    failures when trying to set the same grab combo twice on a window.
    
    X.Org Bug 39545 <http://bugs.freedesktop.org/show_bug.cgi?id=39545>
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Daniel Stone <daniel at fooishbar.org>
    (cherry picked from commit 09496996accfdaf7bc01097a25db400912004d97)

diff --git a/dix/grabs.c b/dix/grabs.c
index 85ca9ee..c28356d 100644
--- a/dix/grabs.c
+++ b/dix/grabs.c
@@ -479,7 +479,7 @@ AddPassiveGrabToList(ClientPtr client, GrabPtr pGrab)
 
     for (grab = wPassiveGrabs(pGrab->window); grab; grab = grab->next)
     {
-	if (GrabMatchesSecond(pGrab, grab, FALSE))
+	if (GrabMatchesSecond(pGrab, grab, (pGrab->grabtype == GRABTYPE_CORE)))
 	{
 	    if (CLIENT_BITS(pGrab->resource) != CLIENT_BITS(grab->resource))
 	    {
commit cb9c1d6d6cb25f55b1e4ac382e5af72a044e06aa
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Jul 28 15:43:10 2011 +1000

    dix: avoid using the VCP as modifier device
    
    Core grabs may change device when they're activated to reflect the master
    they apply to. If the device is a keyboard, modifierDevice is erroneously
    set to the Virtual Core Pointer.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Daniel Stone <daniel at fooishbar.org>
    (cherry picked from commit 80c37048539daa1d257d127d66502bde45c97c85)

diff --git a/dix/events.c b/dix/events.c
index 9e58edb..89f6810 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3678,7 +3678,7 @@ CheckPassiveGrabsOnWindow(
             if (tempGrab.type < GenericEvent)
             {
                 grab->device = device;
-                grab->modifierDevice = GetPairedDevice(device);
+                grab->modifierDevice = GetMaster(device, MASTER_KEYBOARD);
             }
 
             for (other = inputInfo.devices; other; other = other->next)
commit ef5c31430c891cf44148ea31058ed4cfb9bec21a
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Wed Jul 20 16:21:28 2011 +1000

    config: fix a log message
    
    PRODUCT was taken from the parent, hence ppath.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Reviewed-by: Daniel Stone <daniel at fooishbar.org>
    (cherry picked from commit e684e816acb617b4dc66a68e2b0ba8f80399170a)

diff --git a/config/udev.c b/config/udev.c
index e7383dc..42713e9 100644
--- a/config/udev.c
+++ b/config/udev.c
@@ -114,7 +114,7 @@ device_added(struct udev_device *udev_device)
                 == -1)
                 attrs.usb_id = NULL;
             else
-                LOG_PROPERTY(path, "PRODUCT", product);
+                LOG_PROPERTY(ppath, "PRODUCT", product);
         }
     }
     if (!name)
commit ec8ee3a9f76cc94d6fa4e7245c1a8fb68a42783c
Author: Peter Harris <pharris at opentext.com>
Date:   Fri Sep 2 18:45:16 2011 -0400

    xkb: add missing swaps for xkbGetDeviceInfoReply
    
    Caught during review of e095369bf.
    
    Signed-off-by: Peter Harris <pharris at opentext.com>
    Reviewed-by-by: Matt Turner <mattst88 at gmail.com>
    Signed-off-by: Matt Turner <mattst88 at gmail.com>
    (cherry picked from commit c90903b4f7a826ae6826a8dd0a901c8362500e46)
    
    Conflicts:
    
    	xkb/xkb.c
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/xkb/xkb.c b/xkb/xkb.c
index 9c66955..6e0f542 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -6240,6 +6240,9 @@ char *			str;
 	swaps(&rep.unsupported,n);
 	swaps(&rep.nDeviceLedFBs,n);
 	swapl(&rep.type,n);
+	swaps(&rep.dfltKbdFB, n);
+	swaps(&rep.dfltLedFB, n);
+	swapl(&rep.devType, n);
     }
     WriteToClient(client,SIZEOF(xkbGetDeviceInfoReply), (char *)&rep);
 


More information about the xorg-commit mailing list