summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy White <jwhite@codeweavers.com>2019-04-05 09:38:31 -0500
committerFrediano Ziglio <fziglio@redhat.com>2019-04-06 08:09:31 +0100
commit922ec516beaae0c0735bbd46d470908f243e3605 (patch)
tree3c6b8617efd63bc628e61f398ae01dfdab14a8e2
parente2981166c10c38b89adc35f106e20b95b15ac47e (diff)
Correct a long standing led state bug in XSpice.
The CtrlProc for our keyboard driver incorrectly mapped the device private to a SpiceKbd* intead of to a InputInfoPtr. That resulted in led state being written into the driver name for our driver structure, instead of into the led state. That, in turn, led to a cool bug where if you pressed caps lock, the two second sync timer in the spice server would cause it to attempt to correct the state by pressing caps lock to get the states to match. Since the states will never match, the caps lock effectively cycles on and off every two seconds. Signed-off-by: Jeremy White <jwhite@codeweavers.com> Acked-by: Victor Toso <victortoso@redhat.com>
-rw-r--r--src/spiceqxl_inputs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/spiceqxl_inputs.c b/src/spiceqxl_inputs.c
index b39eeae..5625309 100644
--- a/src/spiceqxl_inputs.c
+++ b/src/spiceqxl_inputs.c
@@ -138,9 +138,11 @@ static void xspice_keyboard_control(DeviceIntPtr device, KeybdCtrl *ctrl)
};
XSpiceKbd *kbd;
+ InputInfoPtr pInfo;
int i;
- kbd = device->public.devicePrivate;
+ pInfo = device->public.devicePrivate;
+ kbd = pInfo->private;
kbd->ledstate = 0;
for (i = 0; i < ArrayLength(bits); i++) {
if (ctrl->leds & bits[i].xbit) {