dix: check_modmap_change() returns Success, not true

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

Reported-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Peter Hutterer 2018-08-08 15:22:41 +10:00 committed by Adam Jackson
parent c20e7b5e22
commit 4fe02b8da3

View File

@ -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);
}