xserver: Branch 'master' - 2 commits

Peter Hutterer whot at kemper.freedesktop.org
Mon Feb 23 00:56:08 PST 2009


 dix/inpututils.c               |   18 ------------------
 hw/xfree86/common/xf86Xinput.c |    2 +-
 2 files changed, 1 insertion(+), 19 deletions(-)

New commits:
commit 1df6716281579e2937743d840ab1079343c503ac
Author: Adam Tkac <vonsch at gmail.com>
Date:   Mon Feb 23 09:28:26 2009 +1000

    xfree86: don't try to UnInit virtual devices in DIDR. (#20087)
    
    DeleteInputDeviceRequest function doesn't handle "virtual" devices well.
    TightVNC libvnc.so module to X (which makes bare Xorg VNC capable) uses such
    kind of devices.
    
    Bare Xvnc (it is something like Xvfb) simply uses AddInputDevice &
    RegisterDevice functions. Xvnc uses DeleteInputDeviceRequest from Xi/stubs.c
    so everything works fine (now I see that DeleteInputDeviceRequest in
    Xi/stubs.c should call RemoveDevice function, shouldn't it? :) )
    
    Situation is quite different when you use libvnc.so module. It uses same
    schema as Xvnc, so it simply calls AddInputDevice & RegisterDevice. Thus
    device is created correctly. When server is terminated it calls
    DeleteInputDeviceRequest (now from hw/xfree86/common/xf86Xinput.c) for each
    device. Here is the difference - Xvnc calls DeleteInputDeviceRequest from
    Xi/stubs.c as I wrote above. Thus Xorg gets sigsegv because "VNC" devices
    don't have real input driver.
    
    X.Org Bug 20087 <http://bugs.freedesktop.org/show_bug.cgi?id=20087>
    
    [This isn't really a fix (libVNC should behave correctly) but not crashing the
    server sounds like an improvement.]
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 59b616c..df1ecb9 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -720,7 +720,7 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev)
     OsBlockSignals();
     RemoveDevice(pDev);
 
-    if (!isMaster)
+    if (!isMaster && pInfo != NULL)
     {
         if(drv->UnInit)
             drv->UnInit(drv, pInfo, 0);
commit a50c40be1f28467bcef7dc71fab54ebdddacffdf
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Sat Feb 21 08:09:40 2009 +1000

    dix: don't apply button mappings to SDs, or the device's MD. (#20122)
    
    Only ever change the button map on the device we actually care about, not the
    attached SDs, not the current MD of the device.
    
    X.Org Bug 20122 <http://bugs.freedesktop.org/show_bug.cgi?id=20122>
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Acked-by: Daniel Stone <daniel at fooishbar.org>

diff --git a/dix/inpututils.c b/dix/inpututils.c
index 366a897..07a2383 100644
--- a/dix/inpututils.c
+++ b/dix/inpututils.c
@@ -119,24 +119,6 @@ ApplyPointerMapping(DeviceIntPtr dev, CARD8 *map, int len, ClientPtr client)
         return ret;
     do_butmap_change(dev, map, len, client);
 
-    /* Change any attached masters/slaves. */
-    if (dev->isMaster) {
-        for (tmp = inputInfo.devices; tmp; tmp = tmp->next) {
-            if (!tmp->isMaster && tmp->u.master == dev)
-                if (check_butmap_change(tmp, map, len, NULL, client) == Success)
-                    do_butmap_change(tmp, map, len, client);
-        }
-    }
-    else {
-        for (tmp = inputInfo.devices; tmp; tmp = tmp->next) {
-            if (tmp->isMaster && tmp->u.lastSlave == dev) {
-                /* If this fails, expect the results to be weird. */
-                if (check_butmap_change(tmp, map, len, NULL, client) == Success)
-                    do_butmap_change(tmp, map, len, client);
-            }
-        }
-    }
-
     return Success;
 }
 


More information about the xorg-commit mailing list