summaryrefslogtreecommitdiff
path: root/dix/inpututils.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-12-09 18:38:53 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-12-13 13:24:57 +1000
commitadf8a0d62c0643f4c44a3b6d2e3c6c9b02532915 (patch)
tree97c45a7d4f73b1c553ee8e188a4b7046f9a77a29 /dix/inpututils.c
parenta03fe819506fbcbfcb299d4919d16061603fd4ec (diff)
dix: move event filter retrieval helpers to inpututils.c
No functional changes Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Diffstat (limited to 'dix/inpututils.c')
-rw-r--r--dix/inpututils.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/dix/inpututils.c b/dix/inpututils.c
index 5844daf9c..9232bdc29 100644
--- a/dix/inpututils.c
+++ b/dix/inpututils.c
@@ -695,6 +695,25 @@ void event_set_state(DeviceIntPtr mouse, DeviceIntPtr kbd, DeviceEvent *event)
}
}
+/**
+ * Return the event filter mask for the given device and the given core or
+ * XI1 protocol type.
+ */
+Mask
+event_get_filter_from_type(DeviceIntPtr dev, int evtype)
+{
+ return event_filters[dev ? dev->id : 0][evtype];
+}
+
+/**
+ * Return the event filter mask for the given device and the given core or
+ * XI2 protocol type.
+ */
+Mask
+event_get_filter_from_xi2type(int evtype)
+{
+ return (1 << (evtype % 8));
+}
Bool
point_on_screen(ScreenPtr pScreen, int x, int y)