Go to file
Peter Hutterer 651c36e95e xkb: post-fix PointerKeys button events with a DeviceChangedEvent.
commit 1432785839
    xkb: release XTEST pointer buttons on physical releases. (#28808)
revealed a bug with the XTEST/PointerKeys interaction.

Events resulting from PointerKeys are injected into the event processing
stream, not appended to the event queue. The events generated for the fake
button press include a DeviceChangedEvent (DCE), a raw button event and the
button event itself. The DCE causes the master to switch classes to the
attached XTEST pointer device.

Once the fake button is processed, normal event processing continues with
events in the EQ. The master still contains the XTEST classes, causing some
events to be dropped if e.g. the number of valuators of the event in the
queue exceeds the XTEST device's number of valuators.

Example: the EQ contains the following events, processed one-by-one, left to
right.

[DCE (dev)][Btn down][Btn up][Motion][Motion][...]
                  ^ XkbFakeDeviceButton injects [DCE (XTEST)][Btn up]

Thus the event sequence processed looks like this:

[DCE (dev)][Btn down][Btn up][DCE (XTEST)][Btn up][Motion][Motion][...]

The first DCE causes the master to switch to the device. The button up event
injects a DCE to the XTEST device, causing the following Motion events to be
processed with the master still being on XTEST classes.

This patch post-fixes the injected event sequence with a DCE to restore the
classes of the original slave device, resulting in an event sequence like
this:
[DCE (dev)][Btn down][Btn up][DCE (XTEST)][Btn up][DCE (dev)][Motion][Motion]

Note that this is a simplified description. The event sequence injected by
the PointerKeys code is injected for the master device only and the matching
slave device that caused the injection has already finished processing on
the slave. Furthermore, the injection happens as part of the the XKB layer,
before the unwrapping of the processInputProc takes us into the DIX where
the DCE is actually handled.

Bug reproducible with a device that reports more than 2 valuators. Simply
cause button releases on the device and wait for a "too many valuators"
warning message.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-08-13 11:07:13 +10:00
composite composite: fix freeing of old pixmap until after move/resize/cbw (bug 28345) 2010-06-22 11:41:20 -07:00
config config: Replace xstrdup with strdup in add_option() 2010-06-11 19:05:46 +07:00
damageext Set DamageSetReportAfterOp to true for the damage extension 2010-08-06 08:30:47 -04:00
dbe miDbe window priv priv is pre-allocated, don't use dixSetPrivate (bug 28639) 2010-07-02 12:30:24 -04:00
dix xkb: post-fix PointerKeys button events with a DeviceChangedEvent. 2010-08-13 11:07:13 +10:00
doc doc: add missing .gitignore for Xserver-DTrace 2010-08-09 21:17:53 -07:00
exa EXA: Finish access to pixmap if it's prepared at destruction time. 2010-07-13 10:07:04 -07:00
fb Don't let alpha maps recurse in fb. Bug 23581. 2010-08-10 09:18:22 -07:00
glx Unwrap/rewrap EnterVT/LeaveVT completely, Fixes 28998 2010-07-13 09:58:04 -07:00
hw Cygwin/X: Fix glxWinCreateDrawable() for API change 2010-08-10 09:29:39 -07:00
include xkb: post-fix PointerKeys button events with a DeviceChangedEvent. 2010-08-13 11:07:13 +10:00
m4 dolt: add Cygwin to supported platforms 2009-10-13 20:30:22 -07:00
mi miModifyPixmapHeader: always update serialNumber 2010-07-09 16:13:03 -07:00
miext rootless: fix uninitialized private key assert in non-rootless modes in Cygwin/X 2010-08-10 09:13:30 -07:00
os Always call the flush callback chain when we flush client buffers 2010-08-06 08:28:10 -04:00
randr rotation: fix cursor and overlap of one pixel. 2010-06-22 11:38:30 -07:00
record record: Prevent a crash on recording client disconnect. 2010-06-22 11:43:36 -07:00
render Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
test xfree86: Match devices based on USB ID 2010-06-11 09:30:33 +10:00
Xext xace: Invalid reference to out-of-scope data. 2010-08-10 16:04:16 -07:00
xfixes Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
Xi dix: add aux. functions for button_is_down, set_button_down, set_button_up. 2010-07-07 13:29:46 +10:00
xkb xkb: post-fix PointerKeys button events with a DeviceChangedEvent. 2010-08-13 11:07:13 +10:00
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
autogen.sh autogen.sh: Pass --force to autoreconf 2008-07-22 16:55:26 +03:00
configure.ac Add documentation of the Xserver DTrace probes 2010-07-23 12:41:59 -07:00
COPYING Update Sun license notices to current X.Org standard form 2009-12-16 17:11:35 -08:00
cpprules.in xfree86: Set a saner search path for xorg.conf.d 2010-04-08 15:21:01 +10:00
fix-miregion Change region implementation names to eliminate the 'mi' prefix 2010-06-05 17:47:32 -07:00
fix-miregion-private Change region implementation names to eliminate the 'mi' prefix 2010-06-05 17:47:32 -07:00
fix-patch-whitespace Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
fix-region Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
Makefile.am Fix relink targets for silent rules 2010-03-22 00:45:52 -05:00
README packaging: provide a default README file #24206 2010-01-27 14:00:17 -08:00
xorg-server.m4 macros: use PKG_CONFIG variable rather than executable name 2010-01-07 12:57:23 -08:00
xorg-server.pc.in config: declare xserver private dependencies in xorg-server.pc 2010-06-22 11:34:47 -07:00

					X Server

The X server accepts requests from client applications to create windows,
which are (normally rectangular) "virtual screens" that the client program
can draw into.

Windows are then composed on the actual screen by the X server
(or by a separate composite manager) as directed by the window manager,
which usually communicates with the user via graphical controls such as buttons
and draggable titlebars and borders.

For a comprehensive overview of X Server and X Window System, consult the
following article:
http://en.wikipedia.org/wiki/X_server

All questions regarding this software should be directed at the
Xorg mailing list:

        http://lists.freedesktop.org/mailman/listinfo/xorg

Please submit bug reports to the Xorg bugzilla:

        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg

The master development code repository can be found at:

        git://anongit.freedesktop.org/git/xorg/xserver

        http://cgit.freedesktop.org/xorg/xserver

For patch submission instructions, see:

	http://www.x.org/wiki/Development/Documentation/SubmittingPatches

For more information on the git code manager, see:

        http://wiki.x.org/wiki/GitPage