fake a movement before sending a click

this makes the touch to mouse clicks mapping for xwayland
clients be a bit more reliable in accepting and correctly managing events
This commit is contained in:
Marco Martin 2015-09-28 15:18:19 +02:00
parent 7021be3ae2
commit ac4ef26990

View file

@ -903,6 +903,8 @@ qint32 SeatInterface::touchDown(const QPointF &globalPosition)
wl_pointer_send_enter(p->resource(), serial, wl_pointer_send_enter(p->resource(), serial,
focusedTouchSurface()->resource(), focusedTouchSurface()->resource(),
wl_fixed_from_double(pos.x()), wl_fixed_from_double(pos.y())); wl_fixed_from_double(pos.x()), wl_fixed_from_double(pos.y()));
wl_pointer_send_motion(p->resource(), timestamp(),
wl_fixed_from_double(pos.x()), wl_fixed_from_double(pos.y()));
wl_pointer_send_button(p->resource(), serial, timestamp(), BTN_LEFT, WL_POINTER_BUTTON_STATE_PRESSED); wl_pointer_send_button(p->resource(), serial, timestamp(), BTN_LEFT, WL_POINTER_BUTTON_STATE_PRESSED);
} }