[Spice-commits] gtk/spice-widget.c
Christophe Fergau
teuf at kemper.freedesktop.org
Mon Feb 10 08:18:26 PST 2014
gtk/spice-widget.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit d28d6e11d20a562a93f23edf1e2a41019ecf6be0
Author: Christophe Fergeau <cfergeau at redhat.com>
Date: Fri Feb 7 14:36:21 2014 +0100
Don't attempt to send 0 scancode when releasing keys
When releasing all keys, we send a key release for scancode in the
key_state array, including the very first element with scancode 0.
send_key() complain when the scancode is 0, so make sure we don't call it
for this first element.
This fixes a
(remote-viewer:25548): GSpice-CRITICAL **: send_key: assertion 'scancode != 0' failed
warning when starting remote-viewer windowed, and then switching to another
desktop client-side using ctrl+alt+arrow.
diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index 4e76648..f5adf66 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -1255,7 +1255,10 @@ static void release_keys(SpiceDisplay *display)
continue;
}
for (b = 0; b < 32; b++) {
- send_key(display, i * 32 + b, SEND_KEY_RELEASE, FALSE);
+ unsigned int scancode = i * 32 + b;
+ if (scancode != 0) {
+ send_key(display, scancode, SEND_KEY_RELEASE, FALSE);
+ }
}
}
}
More information about the Spice-commits
mailing list