Commit 46f6a258 authored by Gerd Moellmann's avatar Gerd Moellmann

(Fx_backspace_delete_keys_p): Check library and server

XKB versions.  Call XkbFreeKeyboard with 2nd arg 0.
parent 2ece9174
2000-12-28 Gerd Moellmann <gerd@gnu.org>
* xfns.c (Fx_backspace_delete_keys_p): Check library and server
XKB versions. Call XkbFreeKeyboard with 2nd arg 0.
* keyboard.c (echo_char): If C is an integer, always call
push_key_description. Former code could signal an invalid
character error.
......
......@@ -11096,10 +11096,23 @@ usual X keysyms.")
struct frame *f = check_x_frame (frame);
Display *dpy = FRAME_X_DISPLAY (f);
Lisp_Object have_keys;
have_keys = Qnil;
int major, minor, op, event, error;
BLOCK_INPUT;
/* Check library version in case we're dynamically linked. */
major = XkbMajorVersion;
minor = XkbMinorVersion;
if (!XkbLibraryVersion (&major, &minor))
return Qnil;
/* Check that the server supports XKB. */
major = XkbMajorVersion;
minor = XkbMinorVersion;
if (!XkbQueryExtension (dpy, &op, &event, &error, &major, &minor))
return Qnil;
have_keys = Qnil;
kb = XkbGetKeyboard (dpy, XkbAllComponentsMask, XkbUseCoreKbd);
if (kb)
{
......@@ -11118,7 +11131,7 @@ usual X keysyms.")
backspace_keycode = i;
}
XkbFreeKeyboard (kb, XkbAllComponentsMask, True);
XkbFreeKeyboard (kb, 0, True);
if (delete_keycode
&& backspace_keycode
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment