Commit 922ec516 authored by Jeremy White's avatar Jeremy White Committed by Frediano Ziglio

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's avatarJeremy White <jwhite@codeweavers.com>
Acked-by: 's avatarVictor Toso <victortoso@redhat.com>
parent e2981166
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment