xserver-multidpi/xkb
Peter Hutterer ac164e5887 xkb: after changing the keymap, force an indicator update
When NumLock is on and a new keymap is applied, the next modifier state
change will turn off that LED (but leave the state enabled). The cause
for this is a bit convoluted:

* the SLI explicitState is copied from the current state in
  ProcXkbGetKbdByName. Thus, if NumLock is on, that state is 0x2.
* on the next modifier key press (e.g. Shift), XkbApplyState() calls into
  XkbUpdateIndicators() -> XkbUpdateLedAutoState() to update SLIs (if any)
  for the currently changed modifier. But it does so with a mask only for
  the changed modifier (i.e. for Shift).
* XkbUpdateLedAutoState() calculates the state based on this mask and
  ends up with 0 because we don't have a Shift LED and we masked out the
  others.
* XkbUpdateLedAutoState() compares that state with the previous state
  (which is still 0x2) and then proceeds to turn the LED off

This doesn't happen in the normal case because either the mask
encompasses all modifiers or the state matches of the masked-out
modifiers matches the old state.

Avoid this issue by forcing an SLI update after changing the keymap.
This updates the sli->effectiveState and thus restores everything to
happy working order.

https://bugzilla.redhat.com/show_bug.cgi?id=1047151

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-05-04 10:55:09 -04:00
..
ddxBeep.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
ddxCtrls.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
ddxKillSrv.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
ddxLEDs.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
ddxLoad.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
ddxPrivate.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
ddxVT.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
Makefile.am XKB: Remove component listing support 2012-11-19 12:12:28 +10:00
maprules.c Convert XKB to new *allocarray functions 2015-04-21 16:57:54 -07:00
README.compiled R6.6 is the Xorg base-line 2003-11-14 15:54:54 +00:00
xkb.c xkb: after changing the keymap, force an indicator update 2016-05-04 10:55:09 -04:00
xkb.h Move extension initialisation prototypes into extinit.h 2012-07-09 23:06:41 -07:00
xkbAccessX.c xkb: fix SlowKeys release/reject beeps 2016-04-15 16:20:04 -04:00
xkbActions.c Input: Add focus-in event source 2015-11-24 11:36:34 +10:00
XKBAlloc.c Convert XKB to new *allocarray functions 2015-04-21 16:57:54 -07:00
xkbDflts.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xkbEvents.c dix: Squash some new gcc6 warnings 2016-04-29 11:19:58 -04:00
xkbfmisc.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
XKBGAlloc.c Convert XKB to new *allocarray functions 2015-04-21 16:57:54 -07:00
xkbgeom.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xkbInit.c Replace 'sun' with '__sun' 2015-11-30 11:51:22 -05:00
xkbLEDs.c xkb: after changing the keymap, force an indicator update 2016-05-04 10:55:09 -04:00
XKBMAlloc.c Convert XKB to new *allocarray functions 2015-04-21 16:57:54 -07:00
XKBMisc.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xkbout.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xkbPrKeyEv.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xkbSwap.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xkbtext.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xkbUtils.c Convert XKB to new *allocarray functions 2015-04-21 16:57:54 -07:00
XKM_file_format.txt xkb: Add XKM file format description. 2010-02-02 10:03:21 +10:00
xkmread.c Convert XKB to new *allocarray functions 2015-04-21 16:57:54 -07:00

The X server uses this directory to store the compiled version of the
current keymap and/or any scratch keymaps used by clients.  The X server
or some other tool might destroy or replace the files in this directory,
so it is not a safe place to store compiled keymaps for long periods of
time.  The default keymap for any server is usually stored in:
     X<num>-default.xkm
where <num> is the display number of the server in question, which makes
it possible for several servers *on the same host* to share the same 
directory.

Unless the X server is modified, sharing this directory between servers on
different hosts could cause problems.