xcb: Ignore emulated pointer events

X server sends emulated XI_Motion events before each touch sequence.
Filter them out to avoid a mess with mouse events synthesized in
QGuiApplication.

Change-Id: Ic919c86b41e2467a594de7c903cc0f3fc88a6804
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit is contained in:
Alexander Volkov 2015-06-03 16:34:32 +03:00
parent e098b93488
commit 5ca4cab712

View File

@ -526,7 +526,7 @@ void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event)
case XI_ButtonPress:
case XI_ButtonRelease:
case XI_Motion:
if (xi2MouseEvents() && eventListener)
if (xi2MouseEvents() && eventListener && !(xiDeviceEvent->flags & XIPointerEmulated))
eventListener->handleXIMouseEvent(event);
break;