diff options
author | Chase Douglas <chase.douglas@canonical.com> | 2012-02-03 16:19:05 -0800 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-02-08 18:04:14 +1000 |
commit | ab60cadc2afb9d8882144e30fde11c3ef0f999cd (patch) | |
tree | e4ad06f4a4ccbd31e3c2131e20d52d44e46fdc92 /dix | |
parent | f92ba92adfce0e1975feb54ab0e1165b7c2a7bea (diff) |
Store window pointer in touch listener record
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/touch.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/dix/touch.c b/dix/touch.c index db0bf334a..b42859d87 100644 --- a/dix/touch.c +++ b/dix/touch.c @@ -697,12 +697,14 @@ TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource) */ void TouchAddListener(TouchPointInfoPtr ti, XID resource, enum InputLevel level, - enum TouchListenerType type, enum TouchListenerState state) + enum TouchListenerType type, enum TouchListenerState state, + WindowPtr window) { ti->listeners[ti->num_listeners].listener = resource; ti->listeners[ti->num_listeners].level = level; ti->listeners[ti->num_listeners].state = state; ti->listeners[ti->num_listeners].type = type; + ti->listeners[ti->num_listeners].window = window; ti->num_listeners++; } @@ -753,7 +755,7 @@ TouchAddGrabListener(DeviceIntPtr dev, TouchPointInfoPtr ti, } TouchAddListener(ti, grab->resource, grab->grabtype, - type, LISTENER_AWAITING_BEGIN); + type, LISTENER_AWAITING_BEGIN, grab->window); ti->num_grabs++; } @@ -814,7 +816,7 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti, TouchEventHistoryAllocate(ti); TouchAddListener(ti, iclients->resource, XI2, - type, LISTENER_AWAITING_BEGIN); + type, LISTENER_AWAITING_BEGIN, win); return TRUE; } } @@ -830,7 +832,8 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti, TouchEventHistoryAllocate(ti); TouchAddListener(ti, iclients->resource, XI, - LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN); + LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN, + win); return TRUE; } } @@ -845,7 +848,8 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti, { TouchEventHistoryAllocate(ti); TouchAddListener(ti, win->drawable.id, CORE, - LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN); + LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN, + win); return TRUE; } @@ -857,7 +861,7 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti, TouchEventHistoryAllocate(ti); TouchAddListener(ti, iclients->resource, CORE, - type, LISTENER_AWAITING_BEGIN); + type, LISTENER_AWAITING_BEGIN, win); return TRUE; } } |