summaryrefslogtreecommitdiff
path: root/xkb/xkbUtils.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2008-11-27 13:31:18 +1100
committerDaniel Stone <daniel@fooishbar.org>2009-01-20 15:32:19 +1100
commit5ee504cae5f17d16ee7599beaa4b1944a9a8aee6 (patch)
tree534ff741a741ded309cd5c2f95c0677a5686acad /xkb/xkbUtils.c
parentd929ba6886c6f121b101c0bf0f7c63ef9d851a3e (diff)
XKB: Trying to copy to the same keymap is not fatal
Humour the user if they run XkbCopyKeymap(foo, foo). Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xkb/xkbUtils.c')
-rw-r--r--xkb/xkbUtils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 19be1cfb0..12ef1207c 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -2130,9 +2130,12 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
memset(&changes, 0, sizeof(changes));
memset(&cause, 0, sizeof(cause));
- if (!src || !dst || src == dst)
+ if (!src || !dst)
return FALSE;
+ if (src == dst)
+ return TRUE;
+
if (!_XkbCopyClientMap(src, dst))
return FALSE;
if (!_XkbCopyServerMap(src, dst))