summaryrefslogtreecommitdiff
path: root/dix/events.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-02-20 12:09:33 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-03-22 11:33:20 +1000
commit5497ce3da442d27c2dc7796bfef6ccd670bbadc4 (patch)
tree5d025402df0fc0938deab9dd36161c4b1c2a48cf /dix/events.c
parent2c23ef83b0e03e163aeeb06133538606886f4e9c (diff)
dix: IsFloating() on master devices is always false
There are a few subtle bugs during startup where IsFloating() returns true if the device is a master device that is not yet paired with its keyboard device. Force IsFloating() to always return FALSE for master devices, that was the intent after all and any code that relies on the other behaviour should be fixed instead. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Diffstat (limited to 'dix/events.c')
-rw-r--r--dix/events.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dix/events.c b/dix/events.c
index 0e4ba8691..f7b9456ea 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -341,7 +341,7 @@ IsMaster(DeviceIntPtr dev)
Bool
IsFloating(DeviceIntPtr dev)
{
- return GetMaster(dev, MASTER_KEYBOARD) == NULL;
+ return !IsMaster(dev) && GetMaster(dev, MASTER_KEYBOARD) == NULL;
}
/**