xserver: Branch 'master' - 5 commits

Peter Hutterer whot at kemper.freedesktop.org
Sun Dec 7 19:48:24 PST 2008


 Xi/exevents.c                  |    2 +-
 dix/getevents.c                |    6 +++---
 hw/xfree86/common/xf86Config.c |   10 ++++++++--
 hw/xfree86/common/xf86Init.c   |    4 ++--
 hw/xfree86/common/xf86Xinput.c |    4 ++--
 5 files changed, 16 insertions(+), 10 deletions(-)

New commits:
commit 39db182b637041255ed6dac739ff77c8e4e07c30
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Mon Dec 8 12:12:39 2008 +1000

    xfree86: init EQ before trying to initialise the devices (#18890)
    
    The kbd driver may send events during device initialisation, and these events
    need the EQ set up already.
    
    X.Org Bug 18890 <http://bugs.freedesktop.org/show_bug.cgi?id=18890>
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index eacf344..139340e 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1315,6 +1315,8 @@ InitInput(argc, argv)
 
     xf86Info.vtRequestsPending = FALSE;
 
+    mieqInit();
+
     /* Call the PreInit function for each input device instance. */
     for (pDev = xf86ConfigLayout.inputs; pDev && *pDev; pDev++) {
         /* Replace obsolete keyboard driver with kbd */
@@ -1326,8 +1328,6 @@ InitInput(argc, argv)
         if (xf86NewInputDevice(*pDev, &dev, TRUE) == BadAlloc)
             break;
     }
-
-    mieqInit();
 }
 
 /*
commit 78a62d7713c708d067d8824ec41b0a0225c1997f
Author: Tom Jaeger <ThJaeger at gmail.com>
Date:   Mon Dec 8 11:38:12 2008 +1000

    Xi: XIGetDevice needs to ignore the MORE_EVENTS flag.
    
    Reported in X.Org Bug 18882, Comment 5.
    <http://bugs.freedesktop.org/show_bug.cgi?id=18882>
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 43657b9..6d9b667 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -154,7 +154,7 @@ XIGetDevice(xEvent* xE)
         int rc;
         int id;
 
-        id = ((deviceKeyButtonPointer*)xE)->deviceid;
+        id = ((deviceKeyButtonPointer*)xE)->deviceid & ~MORE_EVENTS;
 
         rc = dixLookupDevice(&pDev, id, serverClient, DixUnknownAccess);
         if (rc != Success)
commit ee1a6c28418a6dad6c89f79a994f27bfbaa77368
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Fri Dec 5 10:12:57 2008 +1000

    dix: fix calculation of valuator events.
    
    Follow-up to 4971315296cb. countValuatorEvents was copied from GKVE where it
    was obviously broken but nobody noticed. GPE had the correct version, but that
    one got lost during de-duplication. Restoring the correct calculation - if we
    have 6 valuators, we want 1 valuator event, not 2.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at redhat.com>

diff --git a/dix/getevents.c b/dix/getevents.c
index b77ea46..19e6fa7 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -772,9 +772,9 @@ static int
 countValuatorEvents(int num_valuators)
 {
     if (num_valuators) {
-        if ((num_valuators / 6) + 1 > MAX_VALUATOR_EVENTS)
-            num_valuators = MAX_VALUATOR_EVENTS;
-        return (num_valuators / 6) + 1;
+        if (((num_valuators - 1) / 6) + 1 > MAX_VALUATOR_EVENTS)
+            num_valuators = MAX_VALUATOR_EVENTS * 6;
+        return ((num_valuators - 1)/ 6) + 1;
     } else
         return 0;
 }
commit 13de7511b17b57a28668e1a60b196ccfe61dbcbe
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Thu Dec 4 10:30:02 2008 +1000

    xfree86: Only use the evdev ruleset on linux.
    
    As suggested by Julien Cristau
    
    This is an follow-up to
    commit 9c5dd7337fa93fb1650cc017e523b939dcbf482a
    Author: Peter Hutterer <peter.hutterer at redhat.com>
    Date:   Wed Dec 3 14:24:25 2008 +1000
    
        Let the DDX decide on the XkbRulesDefaults.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at redhat.com>
    Acked-by: Julien Cristau <jcristau at debian.org>
    Signed-off-by: Daniel Stone <daniel at fooishbar.org>

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index a03d977..48d8efd 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -846,6 +846,9 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
     Bool value;
     MessageType from;
     const char *s;
+#ifdef XKB
+    char *rules = "base";
+#endif
 
     /*
      * Merge the ServerLayout and ServerFlags options.  The former have
@@ -1010,8 +1013,11 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
 
     /* AEI on? Then we're not using kbd, so use the evdev rules set. */
 #ifdef XKB
-    XkbSetRulesDflts(((xf86Info.allowEmptyInput) ? "evdev" : "base"),
-                     "pc105", "us", NULL, NULL);
+#if defined(linux)
+    if (xf86Info.allowEmptyInput)
+        rules = "evdev";
+#endif
+    XkbSetRulesDflts(rules, "pc105", "us", NULL, NULL);
 #endif
 
     xf86Info.useDefaultFontPath = TRUE;
commit 8e3279134987a45f2a89c963ef2d33bc3d3c8179
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Thu Dec 4 09:47:25 2008 +1000

    xfree86: fix compiler warning (use of uninitialized variable)
    
    drv and idev are only set for SDs, but are only dereferenced for SDs too, so
    initializing them to NULL is safe.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at redhat.com>

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 38fd1ec..6b92acb 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -650,8 +650,8 @@ void
 DeleteInputDeviceRequest(DeviceIntPtr pDev)
 {
     LocalDevicePtr pInfo = (LocalDevicePtr) pDev->public.devicePrivate;
-    InputDriverPtr drv;
-    IDevRec *idev;
+    InputDriverPtr drv = NULL;
+    IDevRec *idev = NULL;
     IDevPtr *it;
     Bool isMaster = pDev->isMaster;
 


More information about the xorg-commit mailing list