xserver: Branch 'master' - 11 commits

Peter Hutterer whot at kemper.freedesktop.org
Tue Aug 4 15:22:32 PDT 2009


 hw/dmx/dmxcursor.c          |    1 
 hw/dmx/input/dmxevents.c    |   12 ++++++----
 hw/dmx/input/dmxinputinit.c |   49 ++++++++++++++++++++++----------------------
 include/xkbsrv.h            |    4 ---
 xkb/xkbUtils.c              |   29 --------------------------
 5 files changed, 33 insertions(+), 62 deletions(-)

New commits:
commit 6a500fdd4d717947b86f6d6844ebf9a8603eb8e2
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Aug 4 15:29:55 2009 +1000

    dmx: include exglobals.h for DeviceKeyPress and friends.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/dmx/input/dmxevents.c b/hw/dmx/input/dmxevents.c
index 0367e49..37f8cb3 100644
--- a/hw/dmx/input/dmxevents.c
+++ b/hw/dmx/input/dmxevents.c
@@ -56,6 +56,7 @@
 #include "inputstr.h"
 #include "mipointer.h"
 #include "mi.h"
+#include "exglobals.h"
 
 #include "XIstubs.h"
 
commit 591c2f8758ef36a9bbf1625f9c207a1804f58ef4
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Aug 4 15:30:52 2009 +1000

    dmx: typecast to InternalEvent* before mieqEnqueue.
    
    Silences a few compiler warnings.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/dmx/input/dmxevents.c b/hw/dmx/input/dmxevents.c
index d8ffe6d..0367e49 100644
--- a/hw/dmx/input/dmxevents.c
+++ b/hw/dmx/input/dmxevents.c
@@ -237,7 +237,7 @@ static void enqueueMotion(DevicePtr pDev, int x, int y)
     nevents = GetPointerEvents(events, p, MotionNotify, detail,
                                POINTER_ABSOLUTE, 0, 2, valuators);
     for (i = 0; i < nevents; i++)
-       mieqEnqueue(p, (events + i)->event);
+       mieqEnqueue(p, (InternalEvent*)(events + i)->event);
     return;
 }
 
@@ -695,7 +695,7 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
         /*ErrorF("KEY %d  sym %d\n", detail, (int) keySym);*/
         nevents = GetKeyboardEvents(events, p, type, detail);
         for (i = 0; i < nevents; i++)
-            mieqEnqueue(p, (events + i)->event);
+            mieqEnqueue(p, (InternalEvent*)(events + i)->event);
         return;
 
     case ButtonPress:
@@ -708,7 +708,7 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
                                    0,   /* num_valuators = 0 */
                                    valuators);
         for (i = 0; i < nevents; i++)
-            mieqEnqueue(p, (events + i)->event);
+            mieqEnqueue(p, (InternalEvent*)(events + i)->event);
         return;
 
     case MotionNotify:
@@ -719,7 +719,7 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
         nevents = GetPointerEvents(events, p, type, detail, 
                                    POINTER_ABSOLUTE, 0, 3, valuators);
         for (i = 0; i < nevents; i++)
-            mieqEnqueue(p, (events + i)->event);
+            mieqEnqueue(p, (InternalEvent*)(events + i)->event);
         return;
 
     case EnterNotify:
commit 15b425b5a6630d2ac95b490f4f4dbb9240ac9c5d
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Aug 4 15:31:42 2009 +1000

    dmx: move 'state' around to silence compiler warning.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/dmx/input/dmxevents.c b/hw/dmx/input/dmxevents.c
index 24275a1..d8ffe6d 100644
--- a/hw/dmx/input/dmxevents.c
+++ b/hw/dmx/input/dmxevents.c
@@ -99,7 +99,6 @@ static int dmxCheckFunctionKeys(DMXLocalInputInfoPtr dmxLocal,
                                 KeySym keySym)
 {
     DMXInputInfo   *dmxInput = &dmxInputs[dmxLocal->inputIdx];
-    unsigned short state = 0;
 
 #if 1 /* hack to detect ctrl-alt-q, etc */
     static int ctrl = 0, alt = 0;
@@ -119,6 +118,8 @@ static int dmxCheckFunctionKeys(DMXLocalInputInfoPtr dmxLocal,
     if (!ctrl || !alt)
         return 0;
 #else
+    unsigned short state = 0;
+
     if (dmxLocal->sendsCore)
         state = dmxLocalCoreKeyboard->pDevice->key->state;
     else if (dmxLocal->pDevice->key)
commit e10f802c8260e034fd6c835d3f2622d9cd5085f8
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Aug 4 15:40:17 2009 +1000

    dmx: include inputstr.h for inputInfo.pointer
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/dmx/dmxcursor.c b/hw/dmx/dmxcursor.c
index 32934bb..e8a1845 100644
--- a/hw/dmx/dmxcursor.c
+++ b/hw/dmx/dmxcursor.c
@@ -90,6 +90,7 @@
 #include "globals.h"
 #include "cursorstr.h"
 #include "dixevents.h"          /* For GetSpriteCursor() */
+#include "inputstr.h"           /* for inputInfo.pointer */
 
 #if DMX_CURSOR_DEBUG
 #define DMXDBG0(f)               dmxLog(dmxDebug,f)
commit 9ffc3f280b3907a672f99101548a5eb52027b37f
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Aug 4 15:40:31 2009 +1000

    dmx: don't call InitKbdFeedbackClassDeviceStruct - doesn't exist anymore.
    
    InitKeyboardDeviceStruct does the same task now.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c
index ff44432..666db21 100644
--- a/hw/dmx/input/dmxinputinit.c
+++ b/hw/dmx/input/dmxinputinit.c
@@ -500,9 +500,6 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what)
         if (info.proximityClass)   InitProximityClassDeviceStruct(pDevice);
         if (info.ptrFeedbackClass)
             InitPtrFeedbackClassDeviceStruct(pDevice, dmxChangePointerControl);
-        if (info.kbdFeedbackClass)
-            InitKbdFeedbackClassDeviceStruct(pDevice, dmxKeyboardBellProc,
-                                             dmxKeyboardKbdCtrlProc);
         if (info.intFeedbackClass || info.strFeedbackClass)
             dmxLog(dmxWarning,
                    "Integer and string feedback not supported for %s\n",
commit 63155cf985ee15bf6aad95066b076ab680cf5a31
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Aug 4 15:28:30 2009 +1000

    dmx: pass button/axis labels into the init functions (currently unset)
    
    Currently only None labels are passed in, in the future these labels should
    be whatever the respective buttions/axes are.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c
index 7e34072..ff44432 100644
--- a/hw/dmx/input/dmxinputinit.c
+++ b/hw/dmx/input/dmxinputinit.c
@@ -436,7 +436,9 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what)
     int              fd;
     DMXLocalInitInfo info;
     int              i;
-    
+    Atom             btn_labels[MAX_BUTTONS] = {0}; /* FIXME */
+    Atom             axis_labels[MAX_VALUATORS] = {0}; /* FIXME */
+
     if (dmxInput->detached) return Success;
 
     memset(&info, 0, sizeof(info));
@@ -457,31 +459,38 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what)
                                      dmxBell, dmxKbdCtrl);
         }
         if (info.buttonClass) {
-            InitButtonClassDeviceStruct(pDevice, info.numButtons, info.map);
+            InitButtonClassDeviceStruct(pDevice, info.numButtons,
+                                        btn_labels, info.map);
         }
         if (info.valuatorClass) {
             if (info.numRelAxes && dmxLocal->sendsCore) {
                 InitValuatorClassDeviceStruct(pDevice, info.numRelAxes,
+                                              axis_labels,
                                               GetMaximumEventsNum(),
                                               Relative);
                 for (i = 0; i < info.numRelAxes; i++)
-                    InitValuatorAxisStruct(pDevice, i, info.minval[0],
-                                           info.maxval[0], info.res[0],
+                    InitValuatorAxisStruct(pDevice, i, axis_labels[i],
+                                           info.minval[0], info.maxval[0],
+                                           info.res[0],
                                            info.minres[0], info.maxres[0]);
             } else if (info.numRelAxes) {
                 InitValuatorClassDeviceStruct(pDevice, info.numRelAxes,
+                                              axis_labels,
                                               dmxPointerGetMotionBufferSize(),
                                               Relative);
                 for (i = 0; i < info.numRelAxes; i++)
-                    InitValuatorAxisStruct(pDevice, i, info.minval[0],
+                    InitValuatorAxisStruct(pDevice, i, axis_labels[i],
+                                           info.minval[0],
                                            info.maxval[0], info.res[0],
                                            info.minres[0], info.maxres[0]);
             } else if (info.numAbsAxes) {
                 InitValuatorClassDeviceStruct(pDevice, info.numAbsAxes,
+                                              axis_labels,
                                               dmxPointerGetMotionBufferSize(),
                                               Absolute);
                 for (i = 0; i < info.numAbsAxes; i++)
                     InitValuatorAxisStruct(pDevice, i+info.numRelAxes,
+                                           axis_labels[i + info.numRelAxes],
                                            info.minval[i+1], info.maxval[i+1],
                                            info.res[i+1], info.minres[i+1],
                                            info.maxres[i+1]);
commit af85973a0a80fb0ba82330ae3ec897f65d618003
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Aug 4 15:25:06 2009 +1000

    dmx: remove now-useless defines.
    
    XI is mandatory so we can expect both to be defined.

diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c
index d303607..7e34072 100644
--- a/hw/dmx/input/dmxinputinit.c
+++ b/hw/dmx/input/dmxinputinit.c
@@ -78,14 +78,6 @@
 #include "exevents.h"
 #include "extinit.h"
 
-/* From XI.h */
-#ifndef Relative
-#define Relative 0
-#endif
-#ifndef Absolute
-#define Absolute 1
-#endif
-
 DMXLocalInputInfoPtr dmxLocalCorePointer, dmxLocalCoreKeyboard;
 
 static DMXLocalInputInfoRec DMXDummyMou = {
commit 654d7a02600bbafd890f555a081aa0a2fcb5e253
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Aug 4 15:23:01 2009 +1000

    Revert "dmx: claim we support XI 2."
    
    XQueryInputVersion doesn't exist anymore and for now XI 1 support is good
    enough.
    
    This reverts commit 8da8a0fec4b1b9d9208635dedb2f449dc99e0004.

diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c
index 9c316aa..d303607 100644
--- a/hw/dmx/input/dmxinputinit.c
+++ b/hw/dmx/input/dmxinputinit.c
@@ -845,7 +845,7 @@ static void dmxInputScanForExtensions(DMXInputInfo *dmxInput, int doXI)
     
     /* Print out information about the XInput Extension. */
     handler = XSetExtensionErrorHandler(dmxInputExtensionErrorHandler);
-    ext     = XQueryInputVersion(display, XI_2_Major, XI_2_Minor);
+    ext     = XGetExtensionVersion(display, INAME);
     XSetExtensionErrorHandler(handler);
     
     if (!ext || ext == (XExtensionVersion *)NoSuchExtension) {
commit e7c950c6273ff93f25c091c93d86da6e332a2277
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Aug 4 15:15:24 2009 +1000

    dmx: fix a call to XkbSetRulesDflts, takes XkbRMLVOSet now.

diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c
index 478196e..9c316aa 100644
--- a/hw/dmx/input/dmxinputinit.c
+++ b/hw/dmx/input/dmxinputinit.c
@@ -381,12 +381,15 @@ static void dmxKeyboardFreeNames(XkbComponentNamesPtr names)
 static int dmxKeyboardOn(DeviceIntPtr pDevice, DMXLocalInitInfo *info)
 {
     GETDMXINPUTFROMPDEVICE;
+    XkbRMLVOSet rmlvo;
 
-    XkbSetRulesDflts(dmxConfigGetXkbRules(),
-                     dmxConfigGetXkbModel(),
-                     dmxConfigGetXkbLayout(),
-                     dmxConfigGetXkbVariant(),
-                     dmxConfigGetXkbOptions());
+    rmlvo.rules = dmxConfigGetXkbRules();
+    rmlvo.model = dmxConfigGetXkbModel();
+    rmlvo.layout = dmxConfigGetXkbLayout();
+    rmlvo.variant = dmxConfigGetXkbVariant();
+    rmlvo.options = dmxConfigGetXkbOptions();
+
+    XkbSetRulesDflts(&rmlvo);
     if (!info->force && (dmxInput->keycodes
                          || dmxInput->symbols
                          || dmxInput->geometry)) {
commit 2cde9208ff756e33d162e2324f4b99540230d743
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Aug 4 14:58:25 2009 +1000

    dmx: Enable/DisableDevice take a boolean variable now.
    
    We want to send events here, so pass in TRUE.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c
index 29895c7..478196e 100644
--- a/hw/dmx/input/dmxinputinit.c
+++ b/hw/dmx/input/dmxinputinit.c
@@ -1189,7 +1189,7 @@ int dmxInputDetach(DMXInputInfo *dmxInput)
                     : (dmxLocal->sendsCore
                        ? " [sends core events]"
                        : ""));
-        DisableDevice(dmxLocal->pDevice);
+        DisableDevice(dmxLocal->pDevice, TRUE);
     }
     dmxInput->detached = True;
     dmxInputLogDevices();
@@ -1257,7 +1257,7 @@ static int dmxInputAttachOld(DMXInputInfo *dmxInput, int *id)
                     : (dmxLocal->sendsCore
                        ? " [sends core events]"
                        : ""));
-        EnableDevice(dmxLocal->pDevice);
+        EnableDevice(dmxLocal->pDevice, TRUE);
     }
     dmxInputLogDevices();
     return 0;
commit 1e210d6d10ec63d22247e5801890e024826fc861
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Aug 4 14:41:46 2009 +1000

    xkb: remove now-unused XkbGetKeysym.
    
    XkbGetKeysyms was only used by the now-removed Keysym grabs.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/include/xkbsrv.h b/include/xkbsrv.h
index 31467e9..cdca8f1 100644
--- a/include/xkbsrv.h
+++ b/include/xkbsrv.h
@@ -942,10 +942,6 @@ extern Bool XkbCopyDeviceKeymap(
         DeviceIntPtr            /* dst */,
         DeviceIntPtr            /* src */);
 
-extern int XkbGetKeysym(
-        DeviceIntPtr            /* dev */,
-        DeviceEvent*            /* event*/);
-
 extern Bool XkbFilterEvents(
         ClientPtr               /* pClient */,
         int                     /* nEvents */,
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 06da1d5..63b1e31 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -2118,32 +2118,3 @@ XkbCopyDeviceKeymap(DeviceIntPtr dst, DeviceIntPtr src)
     return ret;
 }
 
-int
-XkbGetKeysym(DeviceIntPtr dev, DeviceEvent *event)
-{
-    XkbDescPtr xkb = dev->key->xkbInfo->desc;
-    XkbKeyTypePtr kt;
-    int group;
-    int i, level = 0;
-    int modmask;
-
-    group = event->group.base + event->group.latched + event->group.locked;
-
-    if (group >= xkb->ctrls->num_groups)
-        group = XkbAdjustGroup(group, xkb->ctrls);
-
-    modmask = event->mods.base | event->mods.latched; /* don't care about
-                                                         locked mods */
-    kt = XkbKeyKeyType(xkb, event->detail.key, group);
-
-    for (i = 0; i < kt->map_count; i++)
-    {
-        if (kt->map[i].mods.mask == modmask)
-        {
-            level = kt->map[i].level;
-            break;
-        }
-    }
-
-    return XkbKeySymEntry(xkb, event->detail.key, level, group);
-}


More information about the xorg-commit mailing list