From 0fd40599279c8b5f2a32e7dc00491a3f14de76a7 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 20 Nov 2012 17:26:19 -0500 Subject: [PATCH] display: Only care about input events for the VCP/VCK It's unlikely that we'll ever want to support multiple pointer devices. Multiple keyboard devices may become useful in the future, but for now, only care about the core keyboard. https://bugzilla.gnome.org/show_bug.cgi?id=688779 --- src/core/display.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/core/display.c b/src/core/display.c index a8acc9e14..f557ade81 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -75,6 +75,7 @@ #include /* This is set in stone and also hard-coded in GDK. */ +#define VIRTUAL_CORE_POINTER_ID 2 #define VIRTUAL_CORE_KEYBOARD_ID 3 #define GRAB_OP_IS_WINDOW_SWITCH(g) \ @@ -1815,13 +1816,20 @@ get_input_event (MetaDisplay *display, case XI_Motion: case XI_ButtonPress: case XI_ButtonRelease: + if (((XIDeviceEvent *) input_event)->deviceid == VIRTUAL_CORE_POINTER_ID) + return input_event; case XI_KeyPress: case XI_KeyRelease: + if (((XIDeviceEvent *) input_event)->deviceid == VIRTUAL_CORE_KEYBOARD_ID) + return input_event; case XI_FocusIn: case XI_FocusOut: + if (((XIEnterEvent *) input_event)->deviceid == VIRTUAL_CORE_KEYBOARD_ID) + return input_event; case XI_Enter: case XI_Leave: - return input_event; + if (((XIEnterEvent *) input_event)->deviceid == VIRTUAL_CORE_POINTER_ID) + return input_event; default: break; }