[PATCH xf86-video-qxl] Correct a long standing led state bug in XSpice.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
---
 src/spiceqxl_inputs.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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) {
-- 
2.11.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]