summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2009-10-20 12:57:05 +0100
committerKeith Packard <keithp@keithp.com>2009-10-22 10:32:25 +0900
commit909df9beb3ddd02632f36ae682537280a6a8e5b4 (patch)
tree7ac50f370dcad4139317555911f7f064a8859d2c
parent9c48862ac1ac119b6cfb7e376533f53af6a857f4 (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>
-rw-r--r--dix/devices.c8
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;