mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 17:40:40 -05:00
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
This commit is contained in:
parent
1d827049d6
commit
0fd4059927
@ -75,6 +75,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
/* 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,12 +1816,19 @@ 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:
|
||||
if (((XIEnterEvent *) input_event)->deviceid == VIRTUAL_CORE_POINTER_ID)
|
||||
return input_event;
|
||||
default:
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user