summaryrefslogtreecommitdiff
path: root/src/test_xi2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test_xi2.c')
-rw-r--r--src/test_xi2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test_xi2.c b/src/test_xi2.c
index 2201692..b08a395 100644
--- a/src/test_xi2.c
+++ b/src/test_xi2.c
@@ -240,7 +240,7 @@ test_sync_grab(Display *display, Window win)
XIEvent ev;
XNextEvent(display, (XEvent*)&ev);
- if (ev.type == GenericEvent)
+ if (ev.type == GenericEvent && ev.extension == xi_opcode )
{
XIDeviceEvent *event = (XIDeviceEvent*)&ev;
print_deviceevent(event);
@@ -325,7 +325,7 @@ test_xi2(Display *display,
{
XIEvent ev;
XNextEvent(display, (XEvent*)&ev);
- if (ev.type == GenericEvent)
+ if (ev.type == GenericEvent && ev.extension == xi_opcode)
{
XIDeviceEvent *event = (XIDeviceEvent*)&ev;