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>
This commit is contained in:
Peter Hutterer
2011-12-09 18:38:53 +10:00
parent a03fe81950
commit adf8a0d62c
4 changed files with 31 additions and 21 deletions

View File

@@ -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)