diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-02-11 12:19:26 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-02-22 14:35:44 +1000 |
commit | 703baece7ebd128a6742d0523d5b3ebe65126fa5 (patch) | |
tree | 4304c0989e1be7c8a176917c4bf24718a503ead8 /dix | |
parent | 77af45ebc3eda32dc534968cab8d5adfb01bd9e3 (diff) |
dix: Add IsFloating(device) wrapper.
Simplifies check for floating devices.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/events.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dix/events.c b/dix/events.c index 4826781d7..f6d92cf6a 100644 --- a/dix/events.c +++ b/dix/events.c @@ -328,6 +328,13 @@ IsMaster(DeviceIntPtr dev) return dev->type == MASTER_POINTER || dev->type == MASTER_KEYBOARD; } +Bool +IsFloating(DeviceIntPtr dev) +{ + return GetMaster(dev, MASTER_KEYBOARD) == NULL; +} + + /** * Max event opcode. */ |