xserver: Branch 'master' - 7 commits

Peter Hutterer whot at kemper.freedesktop.org
Sun Jul 27 16:41:54 PDT 2008


 config/x11-input.fdi           |    3 +++
 dix/events.c                   |   13 ++++++++-----
 hw/xfree86/common/xf86Config.c |   17 +++++++++++++++++
 xkb/xkbAccessX.c               |    2 +-
 xkb/xkbUtils.c                 |   38 +++++++++++++-------------------------
 5 files changed, 42 insertions(+), 31 deletions(-)

New commits:
commit 3575d9584edf35ec1720bc3755b6576a56613685
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Fri Jul 25 16:46:44 2008 +0930

    config: note that HAL options must be strings.
    
    Only strings are parsed by the server, all others are ignored. Doesn't matter,
    specifying int options as strings works fine anyway.

diff --git a/config/x11-input.fdi b/config/x11-input.fdi
index f2e2d50..9c3f9fb 100644
--- a/config/x11-input.fdi
+++ b/config/x11-input.fdi
@@ -26,6 +26,9 @@
 	    Do not specify "input.x11_options.Device" since "input.device"
 	    will be used automatically.
 
+            You MUST specify all options as strings, otherwise the server will
+            ignore them.
+
         Legacy Keys
 	     "input.xkb.rules"
              "input.xkb.model"
commit 54651ff5ec54f4c621e060b19f31d77d519ef158
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Jul 24 17:41:48 2008 +0930

    xkb: remove superfluous inputInfo.keyboard treatment.
    
    Really not necessary, we can just walk the list and spare us the special
    treatment of the VCK.

diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 0ed7e68..8409ece 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -2014,26 +2014,20 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
         }
     }
 
-    if (inputInfo.keyboard->key->xkbInfo &&
-        inputInfo.keyboard->key->xkbInfo->desc == dst) {
-        pDev = inputInfo.keyboard;
-    }
-    else {
-        for (tmpDev = inputInfo.devices; tmpDev && !pDev;
-             tmpDev = tmpDev->next) {
-            if (tmpDev->key && tmpDev->key->xkbInfo &&
+    for (tmpDev = inputInfo.devices; tmpDev && !pDev;
+            tmpDev = tmpDev->next) {
+        if (tmpDev->key && tmpDev->key->xkbInfo &&
                 tmpDev->key->xkbInfo->desc == dst) {
-                pDev = tmpDev;
-                break;
-            }
+            pDev = tmpDev;
+            break;
         }
-        for (tmpDev = inputInfo.off_devices; tmpDev && !pDev;
-             tmpDev = tmpDev->next) {
-            if (tmpDev->key && tmpDev->key->xkbInfo &&
+    }
+    for (tmpDev = inputInfo.off_devices; tmpDev && !pDev;
+            tmpDev = tmpDev->next) {
+        if (tmpDev->key && tmpDev->key->xkbInfo &&
                 tmpDev->key->xkbInfo->desc == dst) {
-                pDev = tmpDev;
-                break;
-            }
+            pDev = tmpDev;
+            break;
         }
     }
 
commit 70bd8261223366dae9dfdbb999691328d85f093c
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Jul 24 17:38:16 2008 +0930

    xkb: use PickPointer/PickKeyboard in _XkbLookupAnyDevice.

diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 0727ad8..0ed7e68 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -56,16 +56,10 @@ _XkbLookupAnyDevice(DeviceIntPtr *pDev, int id, ClientPtr client,
     int rc = XkbKeyboardErrorCode;
 
     if (id == XkbUseCoreKbd) {
-	if (inputInfo.keyboard)
-	    id = inputInfo.keyboard->id;
-	else
-	    goto out;
+        id = PickKeyboard(client)->id;
     }
     if (id == XkbUseCorePtr) {
-	if (inputInfo.pointer)
-	    id = inputInfo.pointer->id;
-	else
-	    goto out;
+        id = PickPointer(client)->id;
     }
     rc = dixLookupDevice(pDev, id, client, access_mode);
 out:
commit 47160edec7f0d9129576d83f1593a5549879a893
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Jul 24 12:12:45 2008 +0930

    xfree86: warn some more about potential missing input devices.
    
    Put out a warning if xorg.conf has InputDevice sections, but these aren't
    referenced in the used ServerLayout. This is only performed if AllowEmptyInput
    is enabled.
    The reason behind this is that the server used to auto-add the first
    mouse/keyboard sections if none where referenced. Now, with HAL and AEI
    enabled by default, setups that relied on this auto-adding break and are left
    without input devices. The least we can do is warn them.

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index f1ac5ec..4b4a9a8 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -2479,6 +2479,16 @@ checkInput(serverLayoutPtr layout) {
                 "\tThe server relies on HAL to provide the list of input "
                 "devices.\n\tIf no devices become available, reconfigure "
                 "HAL.\n");
+        if (!layout->inputs || !*layout->inputs)
+        {
+            /* No input device specified in ServerLayout. */
+            if (xf86configptr->conf_input_lst &&
+                    xf86configptr->conf_input_lst->inp_identifier)
+                xf86Msg(X_WARNING, "Input devices specified in xorg.conf, but"
+                        " not referenced in ServerLayout.\n\tThese devices"
+                        " will NOT be available.\n");
+        }
+
     }
 }
 
commit f30b0823dbfc5902e54b337b5b6b570ebf216584
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Jul 24 09:56:00 2008 +0930

    xfree86: if AllowEmptyInput is on, warn the user that we rely on HAL now.

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 663d81a..f1ac5ec 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -2473,6 +2473,13 @@ static void
 checkInput(serverLayoutPtr layout) {
     if (!xf86Info.allowEmptyInput)
         checkCoreInputDevices(layout, FALSE);
+    else
+    {
+        xf86Msg(X_INFO, "AllowEmptyInput is on.\n"
+                "\tThe server relies on HAL to provide the list of input "
+                "devices.\n\tIf no devices become available, reconfigure "
+                "HAL.\n");
+    }
 }
 
 /*
commit ad4cd2e241691427689591f7769a1184c8c1c7f5
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Wed Jul 23 17:40:28 2008 +0930

    xkb: don't send core events on SlowKeys.
    
    Core events don't happen until later in the DIX, so pump device events down
    instead. This makes modifiers work again when SlowKeys is enabled.

diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c
index 658e41f..2baa70d 100644
--- a/xkb/xkbAccessX.c
+++ b/xkb/xkbAccessX.c
@@ -347,7 +347,7 @@ XkbControlsPtr	ctrls;
 	XkbSendAccessXNotify(keybd,&ev);
 	if (XkbAX_NeedFeedback(ctrls,XkbAX_SKAcceptFBMask))
 	    XkbDDXAccessXBeep(keybd,_BEEP_SLOW_ACCEPT,XkbSlowKeysMask);
-	AccessXKeyboardEvent(keybd,KeyPress,xkbi->slowKey,False);
+	AccessXKeyboardEvent(keybd,DeviceKeyPress,xkbi->slowKey,False);
 	/* check for magic sequences */
 	if ((ctrls->enabled_ctrls&XkbAccessXKeysMask) &&
 	    ((sym[0]==XK_Shift_R)||(sym[0]==XK_Shift_L)))
commit 7d9dece74fc2bf130ceb8818ced5d9e3ac526900
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Mon Jul 21 22:12:45 2008 +0930

    dix: fix up enter/leave system once again.
    
    Two corrections
    1. the "detail" field has NotifyVirtual, etc., not the "mode" field. This was
    a clear bug.
    2. don't set/unset the flags for NotifyGrab or NotifyUngrab. Clients are
    expected to deal with multiple enter/leave events per window if the mode is
    not NotifyNormal.
    
    Testable with TCL menu boxes (such as used in gitk):
    tk_optionMenu .menu globVar Val1 Val2 Val3 ValJunk
    pack .menu
    
    Thanks to Michel Dänzer for pointing this out.

diff --git a/dix/events.c b/dix/events.c
index c5578b0..d6b3ecb 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -4441,14 +4441,16 @@ EnterLeaveEvent(
 
     /* Clear bit for device, but don't worry about SDs. */
     if (mouse->isMaster && type == LeaveNotify &&
-            (mode != NotifyVirtual && mode != NotifyNonlinearVirtual))
-        ENTER_LEAVE_SEMAPHORE_UNSET(pWin, mouse);
+            (detail != NotifyVirtual && detail != NotifyNonlinearVirtual))
+        if (mode != NotifyUngrab)
+            ENTER_LEAVE_SEMAPHORE_UNSET(pWin, mouse);
 
     inWindow = EnterLeaveSemaphoresIsset(pWin);
 
-    if (!inWindow)
+    if(!inWindow || mode == NotifyGrab || mode == NotifyUngrab)
         sendevent = TRUE;
 
+
     if ((mask & filters[mouse->id][type]) && sendevent)
     {
         if (grab)
@@ -4460,8 +4462,9 @@ EnterLeaveEvent(
     }
 
     if (mouse->isMaster && type == EnterNotify &&
-            (mode != NotifyVirtual && mode != NotifyNonlinearVirtual))
-        ENTER_LEAVE_SEMAPHORE_SET(pWin, mouse);
+            (detail != NotifyVirtual && detail != NotifyNonlinearVirtual))
+        if (mode != NotifyGrab)
+            ENTER_LEAVE_SEMAPHORE_SET(pWin, mouse);
 
     /* we don't have enough bytes, so we squash flags and mode into
        one byte, and use the last byte for the deviceid. */


More information about the xorg-commit mailing list