1
0
mirror of https://github.com/dguglielmi/sunny-overlay.git synced 2025-12-06 22:32:37 +01:00
Files
sunny-overlay/x11-drivers/xf86-video-qxl/files/xf86-video-qxl-0.1.5-correct-a-long-standing-led-state-bug-in-xspice.patch

44 lines
1.5 KiB
Diff

From 922ec516beaae0c0735bbd46d470908f243e3605 Mon Sep 17 00:00:00 2001
From: Jeremy White <jwhite@codeweavers.com>
Date: Fri, 5 Apr 2019 09:38:31 -0500
Subject: [PATCH] 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>
---
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.24.1