[Spice-devel] [PATCH xf86-video-qxl] Correct a long standing led state bug in XSpice.
Victor Toso
victortoso at redhat.com
Fri Apr 5 19:47:28 UTC 2019
Hi,
On Fri, Apr 05, 2019 at 09:38:31AM -0500, Jeremy White wrote:
> 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.
Fun!
> Signed-off-by: Jeremy White <jwhite at codeweavers.com>
Acked-by: Victor Toso <victortoso at redhat.com>
I don't have commit access there, do you?
If not, you can submit a merge request and ask people to merge.
Cheers,
> ---
> 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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190405/b2092141/attachment.sig>
More information about the Spice-devel
mailing list