xserver/include
Keith Packard 6052710670 xkb: merge lockedPtrButtons state from all attached SDs.
Problem:
lockedPtrButtons keeps the state of the buttons locked by a PointerKeys button
press. Unconditionally clearing the bits may cause stuck buttons in this
sequence of events:

1. type Shift + NumLock to enable PointerKeys
2. type 0/Ins on keypad to emulate Button 1 press
        → button1 press event to client
3. press and release button 1 on physical mouse
        → button1 release event to client

Button 1 on the MD is now stuck and cannot be released.

Cause:
XKB PointerKeys button events are posted through the XTEST pointer device.
Once a press is generated, the XTEST device's button is down. The DIX merges
the button state of all attached SDs, hence the MD will have a button down
while the XTEST device has a button down.

PointerKey button events are only generated on the master device to avoid
duplicate events (see XkbFakeDeviceButton()). If the MD has the
lockedPtrButtons bit cleared by a release event on a physical device, no
such event is generated when a keyboard device triggers the PointerKey
ButtonRelease trigger. Since the event - if generated - is posted through
the XTEST pointer device, lack of a generated ButtonRelease event on the
XTEST pointer device means the button is never released, resulting in the
stuck button observed above.

Solution:
This patch merges the MD's lockedPtrButtons with the one of all attached
slave devices on release events. Thus, as long as one attached keyboard has
a lockedPtrButtons bit set, this bit is kept in the MD. Once a PointerKey
button is released on all keyboards, the matching release event is emulated
from the MD through the XTEST pointer device, thus also releasing the button
in the DIX.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-30 08:31:51 -07:00
..
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
Makefile.am Move callback definitions to their own file 2010-04-30 13:04:44 -07:00
XIstubs.h
bstore.h
bstorestr.h
callback.h Move callback definitions to their own file 2010-04-30 13:04:44 -07:00
closestr.h
closure.h
colormap.h Quit using clientErrorValue in dix/colormap.c. 2010-05-13 17:14:07 -07:00
colormapst.h
cursor.h Change the devPrivates API to require dixRegisterPrivateKey 2010-06-05 19:23:03 -07:00
cursorstr.h Change the devPrivates API to require dixRegisterPrivateKey 2010-06-05 19:23:03 -07:00
dix-config-apple-verbatim.h
dix-config.h.in xfree86: Add MatchOS InputClass entry for operating system matching 2010-06-10 14:36:36 +10:00
dix.h Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
dixaccess.h
dixevents.h
dixfont.h dix: use one single function to register fpe fonts 2010-06-24 13:55:28 -07:00
dixfontstr.h
dixgrabs.h
dixstruct.h OS support: fix writeable client vs IgnoreClient behavior 2010-06-30 07:59:04 -07:00
eventconvert.h Re-enable RECORD extension. 2010-02-22 12:04:28 +10:00
events.h XQuartz: Transition from xEvent based mieq to InternalEvent 2009-09-27 23:31:07 -07:00
eventstr.h dix: make DeviceEvent coordinates signed for Xinerama. #24986 2010-05-07 12:17:22 -07:00
exevents.h Xi: if XISetEventMask fails, return this to the client. 2009-09-03 08:39:27 +10:00
extension.h
extinit.h include: XInputExtensionInit doesn't need to be exported. 2009-08-17 10:14:20 +10:00
extnsionst.h Declare functions that unconditionally call FatalError as _X_NORETURN. 2010-05-22 01:00:04 -07:00
gc.h Replace dixChangeGC with calls directly to the right variant. 2010-05-13 17:14:07 -07:00
gcstruct.h Replace screen->rgf scratch GC flags with a bit in each GC. 2010-05-20 14:36:29 -07:00
globals.h Move each screen's x/y origin into ScreenRec. 2010-06-03 14:03:23 -07:00
hotplug.h
input.h xfree86: Match devices based on USB ID 2010-06-11 09:30:33 +10:00
inputstr.h If XTest is always required, then eliminate the XTest devPrivate 2010-06-07 19:56:47 -07:00
kdrive-config.h.in kdrive: Add option to compile out input drivers 2010-01-06 19:47:53 +06:00
list.h list.h: Fix list_for_each_entry_safe() 2010-06-22 12:21:51 -07:00
misc.h Use _X_ATTRIBUTE_PRINTF _X_DEPRECATED _X_NORETURN 2010-05-13 10:03:23 -07:00
miscstruct.h
opaque.h
os.h Use _X_ATTRIBUTE_PRINTF _X_DEPRECATED _X_NORETURN 2010-05-13 10:03:23 -07:00
pixmap.h Change the devPrivates API to require dixRegisterPrivateKey 2010-06-05 19:23:03 -07:00
pixmapstr.h
privates.h Add dixCreatePrivateKey API 2010-06-05 19:31:37 -07:00
property.h
propertyst.h
protocol-versions.h DRI2: advertise lowest supported DRI2 protocol version 2010-03-29 10:02:37 -07:00
ptrveloc.h Replace some input devPrivates with regular struct fields 2010-04-30 13:05:11 -07:00
region.h
regionstr.h Add REGION_ macros for source compatibility with existing drivers. 2010-06-05 19:03:22 -07:00
registry.h
resource.h Add typed resource-lookup errors for non-core resource types. 2010-05-19 12:32:48 -07:00
rgb.h
screenint.h
scrnintstr.h Change region implementation from macros to inline functions. 2010-06-05 19:03:22 -07:00
selection.h
servermd.h
site.h Update COMPILEDDEFAULTFONTPATH to match the new default font path 2009-11-25 13:34:23 -08:00
swaprep.h
swapreq.h
validate.h
version-config.h.in
window.h
windowstr.h Move each screen's screensaver data into ScreenRec. 2010-06-03 14:03:22 -07:00
xkb-config.h.in
xkbfile.h
xkbrules.h
xkbsrv.h xkb: merge lockedPtrButtons state from all attached SDs. 2010-06-30 08:31:51 -07:00
xkbstr.h Revert "XKB: Sanitise * actions" commits (#19602) 2009-07-10 11:23:52 +10:00
xorg-config.h.in DRI2: Allow building without libdrm 2010-06-03 11:56:03 +03:00
xorg-server.h.in Remove support for Solaris x86 releases older than Solaris 8 2009-08-13 21:56:05 -07:00
xserver-properties.h dix: add 3x3 transformation matrix xinput property for multi-head handling 2010-05-28 16:49:30 +10:00
xsha1.h Move SHA1 computation from render/glyph.c to os/ 2009-10-15 01:17:44 +02:00
xwin-config.h.in Cygwin/X: Allow the default log location to be configurable 2010-03-16 14:02:17 +00:00