diff options
author | Chase Douglas <chase.douglas@canonical.com> | 2012-04-18 12:04:58 -0700 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-04-26 13:35:18 +1000 |
commit | a9dbdb49698a15ba9bdf4172a6e2fef6133244f3 (patch) | |
tree | 41b839108d0c12ac215de04e5d79eefaf67874d2 | |
parent | 04431dd5e60dc91b61767157914b874515a18feb (diff) |
Check other clients' core masks properly when adding touch listener
The current code checks the core event mask as though it were an XI
mask. This change fixes the checks so the proper client and event masks
are used.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit ec9c4295830c3de610e65aca17f4da4a7af3c4c5)
-rw-r--r-- | dix/touch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dix/touch.c b/dix/touch.c index 572bdfb94..f8f26c83d 100644 --- a/dix/touch.c +++ b/dix/touch.c @@ -811,6 +811,7 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti, if (mask & EVENT_CORE_MASK) { int coretype = GetCoreType(TouchGetPointerEventType(ev)); Mask core_filter = event_get_filter_from_type(dev, coretype); + OtherClients *oclients; /* window owner */ if (IsMaster(dev) && (win->eventMask & core_filter)) { @@ -822,13 +823,12 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti, } /* all others */ - nt_list_for_each_entry(iclients, (InputClients *) wOtherClients(win), - next) { - if (!(iclients->mask[XIAllDevices] & core_filter)) + nt_list_for_each_entry(oclients, wOtherClients(win), next) { + if (!(oclients->mask & core_filter)) continue; TouchEventHistoryAllocate(ti); - TouchAddListener(ti, iclients->resource, CORE, + TouchAddListener(ti, oclients->resource, CORE, type, LISTENER_AWAITING_BEGIN, win); return TRUE; } |