diff options
author | Yao Wei <mwei@lxde.org> | 2023-02-21 03:43:05 +0000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2023-02-21 03:43:05 +0000 |
commit | 7ce57e179b257f35e447971f4fb6614e3360762a (patch) | |
tree | f4fd8d53140debb237586c0328e406d65b596e6e /dix | |
parent | d2158d4063dd87e630ca4c853ac07b88f3662c8f (diff) | |
download | xserver-7ce57e179b257f35e447971f4fb6614e3360762a.tar.gz |
dix: Force update LEDs after device state update in EnableDevice
This is to make sure the hardware gets the device states regardless
whether the internal state has changed or not, to overcome situations
that device LEDs are out of sync e.g. switching between VTs.
Signed-off-by: Yao Wei (魏銘廷) <yao.wei@canonical.com>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/devices.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/dix/devices.c b/dix/devices.c index f5ab17352..7150734a5 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -422,6 +422,10 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent) if (!IsMaster(dev) && !IsFloating(dev)) XkbPushLockedStateToSlaves(GetMaster(dev, MASTER_KEYBOARD), 0, 0); + + /* Now make sure our LEDs are in sync with the locked state */ + XkbForceUpdateDeviceLEDs(dev); + RecalculateMasterButtons(dev); /* initialise an idle timer for this device*/ |