From dc57f89959e549403f8488eb9f23425bd7118b22 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 11 Feb 2011 12:47:37 +1000 Subject: Switch to use IsFloating() This is not a straightforward search/replacement due to a long-standing issue. dev->u.master is the same field as dev->u.lastSlave. Thus, if dev is a master device, a check for dev->u.master may give us false positives and false negatives. The switch to IsFloating() spells out these cases and modifies the conditions accordingly to cover both cases. Signed-off-by: Peter Hutterer Reviewed-by: Benjamin Tissoires --- dix/inpututils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dix/inpututils.c') diff --git a/dix/inpututils.c b/dix/inpututils.c index ef3142c84..8b7b03523 100644 --- a/dix/inpututils.c +++ b/dix/inpututils.c @@ -273,7 +273,7 @@ change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *modkeymap, do_modmap_change(client, tmp, modmap); } } - else if (dev->u.master && dev->u.master->u.lastSlave == dev) { + else if (!IsFloating(dev) && dev->u.master->u.lastSlave == dev) { /* If this fails, expect the results to be weird. */ if (check_modmap_change(client, dev->u.master, modmap)) do_modmap_change(client, dev->u.master, modmap); -- cgit v1.2.3