From 5497ce3da442d27c2dc7796bfef6ccd670bbadc4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 20 Feb 2012 12:09:33 +1000 Subject: [PATCH] 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 Reviewed-by: Jeremy Huddleston Tested-by: Jon TURNEY --- dix/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } /**