[gnome-settings-daemon] wacom: Never try to create fake events with 0 keycode
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] wacom: Never try to create fake events with 0 keycode
- Date: Wed, 11 Jul 2012 11:41:25 +0000 (UTC)
commit 09ad656ccc1e18563c26903c9c2613f33572e177
Author: Bastien Nocera <hadess hadess net>
Date: Wed Jul 11 12:15:01 2012 +0100
wacom: Never try to create fake events with 0 keycode
XTestFakeKeyEvent() doesn't like it.
https://bugzilla.gnome.org/show_bug.cgi?id=679736
plugins/wacom/gsd-wacom-manager.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-manager.c b/plugins/wacom/gsd-wacom-manager.c
index 73d836c..498364d 100644
--- a/plugins/wacom/gsd-wacom-manager.c
+++ b/plugins/wacom/gsd-wacom-manager.c
@@ -1024,9 +1024,16 @@ generate_key (GsdWacomTabletButton *wbutton,
}
g_free (keys);
- g_debug ("Emitting '%s' (keyval: %d, keycode: %d mods: 0x%x)",
- str, keyval, keycode, mods);
- g_free (str);
+ if (keycode == 0) {
+ g_warning ("Not emitting '%s' (keyval: %d, keycode: %d mods: 0x%x), invalid keycode",
+ str, keyval, keycode, mods);
+ g_free (str);
+ return;
+ } else {
+ g_debug ("Emitting '%s' (keyval: %d, keycode: %d mods: 0x%x)",
+ str, keyval, keycode, mods);
+ g_free (str);
+ }
/* And send out the keys! */
if (is_press)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]