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>
This commit is contained in:
Daniel Stone 2008-11-27 13:31:18 +11:00
parent d929ba6886
commit 5ee504cae5

View File

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