xserver/Xi
Peter Hutterer dc614484f9 Xi: don't copy the modifier key count when copying device classes (#25480)
The modifier key count is maintained by the XKB layer and
increased/decreased for all modifiers that set state.

Test case, MD/SD modifier key count in comment:
1. keyboard 1: press and hold Shift_L    # SD:1     MD:1
2. keyboard 2: press and release Shift_L # SD:1,0   MD:1,0
<class copy happens>                     # SD:1     MD:1
3. keyboard 1: release Shift_L           # SD:0     MD:1
4. keyboard 1: press and release Shift_L # SD:1,0   MD:2,1

The modifier is now logically down on the MD but not on keyboard 1 or
keyboard 2.

XKB is layered in before the DIX, it increases/decreases the modifier key
count accordingly. In the above example, during (2), the MD gets the key
release and thus clears the modifier bit. (3) doesn't forward the release to
the MD because it is already cleared. The copy of modifierKeysDown when the
lastSlave changes however increases the counter for the held key. On (4),
the press and release are both forwarded to the MD, causing a offset by 1
and thus do not clear the logical modifier state.

X.Org Bug 25480 <http://bugs.freedesktop.org/show_bug.cgi?id=25480>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Daniel Stone <daniel@fooishbar.org>
2010-06-11 09:47:42 +10:00
..
Makefile.am Xi: namespace XI2 files. 2009-06-17 09:05:22 +10:00
allowev.c
allowev.h
chgdctl.c Xi: use byte-counting macros instead of manual calculation. 2009-07-14 10:05:53 +10:00
chgdctl.h
chgfctl.c Xi: use byte-counting macros instead of manual calculation. 2009-07-14 10:05:53 +10:00
chgfctl.h
chgkbd.c
chgkbd.h
chgkmap.c Xi: use byte-counting macros instead of manual calculation. 2009-07-14 10:05:53 +10:00
chgkmap.h
chgprop.c Xi: use byte-counting macros instead of manual calculation. 2009-07-14 10:05:53 +10:00
chgprop.h
chgptr.c
chgptr.h
closedev.c Move each screen's root-window pointer into ScreenRec. 2010-06-03 14:03:23 -07:00
closedev.h
devbell.c
devbell.h
exevents.c Xi: don't copy the modifier key count when copying device classes (#25480) 2010-06-11 09:47:42 +10:00
exglobals.h Change the devPrivates API to require dixRegisterPrivateKey 2010-06-05 19:23:03 -07:00
extinit.c Change the devPrivates API to require dixRegisterPrivateKey 2010-06-05 19:23:03 -07:00
getbmap.c Xi: use byte-counting macros instead of manual calculation. 2009-07-14 10:05:53 +10:00
getbmap.h
getdctl.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
getdctl.h
getfctl.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
getfctl.h
getfocus.c
getfocus.h
getkmap.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
getkmap.h
getmmap.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
getmmap.h
getprop.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
getprop.h
getselev.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
getselev.h
getvers.c Xi: use byte-counting macros instead of manual calculation. 2009-07-14 10:05:53 +10:00
getvers.h
grabdev.c Xi: remove obsolete comment. 2009-07-30 08:43:14 +10:00
grabdev.h
grabdevb.c Xi: use byte-counting macros instead of manual calculation. 2009-07-14 10:05:53 +10:00
grabdevb.h
grabdevk.c Xi: use byte-counting macros instead of manual calculation. 2009-07-14 10:05:53 +10:00
grabdevk.h
gtmotion.c Remove more superfluous if(p) checks around free(p) 2010-06-06 20:27:18 +07:00
gtmotion.h
listdev.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
listdev.h
opendev.c Xi: use byte-counting macros instead of manual calculation. 2009-07-14 10:05:53 +10:00
opendev.h
queryst.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
queryst.h
selectev.c Xi: use byte-counting macros instead of manual calculation. 2009-07-14 10:05:53 +10:00
selectev.h
sendexev.c Xi: fix not reached code in XSendExtensionEvent 2010-04-21 18:07:16 +03:00
sendexev.h
setbmap.c Xi: use byte-counting macros instead of manual calculation. 2009-07-14 10:05:53 +10:00
setbmap.h
setdval.c Xi: use byte-counting macros instead of manual calculation. 2009-07-14 10:05:53 +10:00
setdval.h indent fixes (OMG SO UGLY), and nuke old RCS keywords. 2006-02-20 22:16:49 +00:00
setfocus.c
setfocus.h
setmmap.c Xi: use byte-counting macros instead of manual calculation. 2009-07-14 10:05:53 +10:00
setmmap.h
setmode.c Xi: assume BadMode for non-BadMatch errors returned from SetDeviceMode. 2010-02-22 12:04:36 +10:00
setmode.h
stubs.c Revert "Add a "flags" field to DeleteInputDeviceRequest." 2010-05-26 07:54:35 -07:00
ungrdev.c
ungrdev.h
ungrdevb.c input: ensure various ProcUngrabKey/Buttons have the right grabtype set. 2009-05-04 17:40:29 +10:00
ungrdevb.h
ungrdevk.c input: ensure various ProcUngrabKey/Buttons have the right grabtype set. 2009-05-04 17:40:29 +10:00
ungrdevk.h
xiallowev.c input: bump to ints for deviceids - XI2 requires 16-bit deviceids. 2009-06-18 14:40:54 +10:00
xiallowev.h Xi: standardise XI2 headers. 2009-09-03 08:39:27 +10:00
xichangecursor.c Move each screen's root-window pointer into ScreenRec. 2010-06-03 14:03:23 -07:00
xichangecursor.h Xi: namespace XI2 files. 2009-06-17 09:05:22 +10:00
xichangehierarchy.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
xichangehierarchy.h Xi: standardise XI2 headers. 2009-09-03 08:39:27 +10:00
xigetclientpointer.c Xi: fix up access modes for calls to dixLookupDevice(). 2009-06-23 20:50:29 -04:00
xigetclientpointer.h Xi: namespace XI2 files. 2009-06-17 09:05:22 +10:00
xigrabdev.c Xi: Unify checking for invalid bits in grab masks. 2009-09-03 08:39:27 +10:00
xigrabdev.h Xi: standardise XI2 headers. 2009-09-03 08:39:27 +10:00
xipassivegrab.c Return an appropriately-typed error from dixLookupResourceByType. 2010-05-19 12:32:48 -07:00
xipassivegrab.h Xi: standardise XI2 headers. 2009-09-03 08:39:27 +10:00
xiproperty.c Remove more superfluous if(p) checks around free(p) 2010-06-06 20:27:18 +07:00
xiproperty.h Xi: reset the known properties at the end of the server generation. 2010-05-07 12:16:43 -07:00
xiquerydevice.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
xiquerydevice.h xace: Fake return values on denials in input polling requests. 2009-10-14 19:19:19 -04:00
xiquerypointer.c Move each screen's x/y origin into ScreenRec. 2010-06-03 14:03:23 -07:00
xiquerypointer.h Xi: namespace XI2 files. 2009-06-17 09:05:22 +10:00
xiqueryversion.c Xi: namespace XI2 files. 2009-06-17 09:05:22 +10:00
xiqueryversion.h Xi: namespace XI2 files. 2009-06-17 09:05:22 +10:00
xiselectev.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
xiselectev.h Xi: standardise XI2 headers. 2009-09-03 08:39:27 +10:00
xisetclientpointer.c Xi: check for Use permission on the device in SetClientPointer(). 2009-06-23 20:50:29 -04:00
xisetclientpointer.h Xi: namespace XI2 files. 2009-06-17 09:05:22 +10:00
xisetdevfocus.c Xi: add swapping hook for XIGetFocus reply. 2009-08-24 10:09:05 +10:00
xisetdevfocus.h Xi: standardise XI2 headers. 2009-09-03 08:39:27 +10:00
xiwarppointer.c Xi: return BadDevice for master kbds and attached slaves in XIWarpPointer 2009-09-03 10:00:34 +10:00
xiwarppointer.h Xi: namespace XI2 files. 2009-06-17 09:05:22 +10:00