xserver: Branch 'master'

Eric Anholt anholt at kemper.freedesktop.org
Wed Sep 5 14:57:28 PDT 2007


 hw/xfree86/common/xf86Events.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
diff-tree accd71bda6f958ea6892ad3a10879232d345774c (from 8b77dc7e808f61f1ed10fe05cf898bb47459a76d)
Author: Keith Packard <keithp at koto.keithp.com>
Date:   Wed Sep 5 14:19:19 2007 -0700

    Deliver correct event when releasing keys on VT switch.
    
    In commit 41bb9fce47f6366cc3f7d45790f7883f74289b5a, the event delivery loop
    for Xinput enabled keyboards was changed and accidentally used the wrong
    index variable, causing random events to be delivered when returning from VT
    switch.
    
    In addition, in commit aeba855b07832354f59678e20cc29a085e42bd99,
    SIGIO was blocked during delivery of these events, but not for the entire
    period the xf86Events array was being used. Block SIGIO for the whole loop
    to avoid other event delivery from trashing the key release events.
    (cherry picked from commit aa7ed1f5f35cd043bc38d985500aa0a32e857e84)

diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index dd9c34e..91964c9 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -811,9 +811,11 @@ xf86ReleaseKeys(DeviceIntPtr pDev)
                     (*pDev->public.processInputProc) (&ke, pDev, 1);
                 }
                 else {
+		    int sigstate = xf86BlockSIGIO ();
                     nevents = GetKeyboardEvents(xf86Events, pDev, KeyRelease, i);
                     for (j = 0; j < nevents; j++)
-                        EqEnqueue(pDev, xf86Events + i);
+                        mieqEnqueue(pDev, xf86Events + j);
+		    xf86UnblockSIGIO(sigstate);
                 }
                 break;
             }


More information about the xorg-commit mailing list