diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2009-10-20 12:57:05 +0100 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-10-22 13:31:52 +1000 |
commit | 23ca41f4c3a9cc54116b759615456a0496919f24 (patch) | |
tree | 5594efdd7ca7d59fe68e5145d02c8792d4457073 | |
parent | 4b9979ae19ff9e9bcc7ede01b20c13d954272de1 (diff) |
Resolve an inconsistency between libX11 and Xserver over GetModifierMapping
libX11 ModMap.c believes that GetModifierMapping can never return an error
Xserver devices.c believes that GetModifierMapping can return an error if
the ModMap couldn't be generated
According to the protocol document I have, libX11 is right, so adjust the
server to send back an empty modmap if one couldn't be made...
http://bugs.freedesktop.org/show_bug.cgi?id=24621
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 909df9beb3ddd02632f36ae682537280a6a8e5b4)
-rw-r--r-- | dix/devices.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/dix/devices.c b/dix/devices.c index 6a7907399..7486827f9 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -1520,14 +1520,12 @@ int ProcGetModifierMapping(ClientPtr client) { xGetModifierMappingReply rep; - int ret, max_keys_per_mod = 0; + int max_keys_per_mod = 0; KeyCode *modkeymap = NULL; REQUEST_SIZE_MATCH(xReq); - ret = generate_modkeymap(client, PickKeyboard(client), &modkeymap, - &max_keys_per_mod); - if (ret != Success) - return ret; + generate_modkeymap(client, PickKeyboard(client), &modkeymap, + &max_keys_per_mod); memset(&rep, 0, sizeof(xGetModifierMappingReply)); rep.type = X_Reply; |