[PATCH xserver] dix: check_modmap_change() returns Success, not true

Peter Hutterer peter.hutterer at who-t.net
Wed Aug 8 05:22:41 UTC 2018


Not sure what if anything calls XSetDeviceModifierMapping() but this would've
failed all the time. check_modmap_change() returns Successs but we were
treating it like a boolean. Fix this.

Reported-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 dix/inpututils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dix/inpututils.c b/dix/inpututils.c
index 6bff9efab..c51c83547 100644
--- a/dix/inpututils.c
+++ b/dix/inpututils.c
@@ -282,7 +282,7 @@ change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *modkeymap,
     else if (!IsFloating(dev) &&
              GetMaster(dev, MASTER_KEYBOARD)->lastSlave == dev) {
         /* If this fails, expect the results to be weird. */
-        if (check_modmap_change(client, dev->master, modmap))
+        if (check_modmap_change(client, dev->master, modmap) == Success)
             do_modmap_change(client, dev->master, modmap);
     }
 
-- 
2.17.1



More information about the xorg-devel mailing list