mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-18 19:52:21 +00:00
dix: add resource type to touch listeners
Instead of guessing what resource type the listener is and what property to retrieve, store the resource type in the listener directly. Breaks XIT test cases: TouchGrabTestMultipleTaps.PassiveGrabPointerEmulationMultipleTouchesFastSuccession Fixes https://bugs.freedesktop.org/show_bug.cgi?id=56557 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
This commit is contained in:
parent
9ad0fdb135
commit
f59499b5d0
4 changed files with 16 additions and 16 deletions
18
dix/touch.c
18
dix/touch.c
|
|
@ -675,12 +675,13 @@ TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource)
|
|||
* Add the resource to this touch's listeners.
|
||||
*/
|
||||
void
|
||||
TouchAddListener(TouchPointInfoPtr ti, XID resource, enum InputLevel level,
|
||||
enum TouchListenerType type, enum TouchListenerState state,
|
||||
WindowPtr window,
|
||||
TouchAddListener(TouchPointInfoPtr ti, XID resource, int resource_type,
|
||||
enum InputLevel level, enum TouchListenerType type,
|
||||
enum TouchListenerState state, WindowPtr window,
|
||||
GrabPtr grab)
|
||||
{
|
||||
ti->listeners[ti->num_listeners].listener = resource;
|
||||
ti->listeners[ti->num_listeners].resource_type = resource_type;
|
||||
ti->listeners[ti->num_listeners].level = level;
|
||||
ti->listeners[ti->num_listeners].state = state;
|
||||
ti->listeners[ti->num_listeners].type = type;
|
||||
|
|
@ -741,7 +742,8 @@ TouchAddGrabListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
|||
type = LISTENER_POINTER_GRAB;
|
||||
}
|
||||
|
||||
TouchAddListener(ti, grab->resource, grab->grabtype,
|
||||
/* grab listeners are always RT_NONE since we keep the grab pointer */
|
||||
TouchAddListener(ti, grab->resource, RT_NONE, grab->grabtype,
|
||||
type, LISTENER_AWAITING_BEGIN, grab->window, grab);
|
||||
}
|
||||
|
||||
|
|
@ -797,7 +799,7 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
|||
if (!xi2mask_isset(iclients->xi2mask, dev, XI_TouchOwnership))
|
||||
TouchEventHistoryAllocate(ti);
|
||||
|
||||
TouchAddListener(ti, iclients->resource, XI2,
|
||||
TouchAddListener(ti, iclients->resource, RT_INPUTCLIENT, XI2,
|
||||
type, LISTENER_AWAITING_BEGIN, win, NULL);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -812,7 +814,7 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
|||
continue;
|
||||
|
||||
TouchEventHistoryAllocate(ti);
|
||||
TouchAddListener(ti, iclients->resource, XI,
|
||||
TouchAddListener(ti, iclients->resource, RT_INPUTCLIENT, XI,
|
||||
LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN,
|
||||
win, NULL);
|
||||
return TRUE;
|
||||
|
|
@ -827,7 +829,7 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
|||
/* window owner */
|
||||
if (IsMaster(dev) && (win->eventMask & core_filter)) {
|
||||
TouchEventHistoryAllocate(ti);
|
||||
TouchAddListener(ti, win->drawable.id, CORE,
|
||||
TouchAddListener(ti, win->drawable.id, RT_WINDOW, CORE,
|
||||
LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN,
|
||||
win, NULL);
|
||||
return TRUE;
|
||||
|
|
@ -839,7 +841,7 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
|||
continue;
|
||||
|
||||
TouchEventHistoryAllocate(ti);
|
||||
TouchAddListener(ti, oclients->resource, CORE,
|
||||
TouchAddListener(ti, oclients->resource, RT_OTHERCLIENT, CORE,
|
||||
type, LISTENER_AWAITING_BEGIN, win, NULL);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue