1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-28 10:56:36 +00:00

(Fx_backspace_delete_keys_p): Check library and server

XKB versions.  Call XkbFreeKeyboard with 2nd arg 0.
This commit is contained in:
Gerd Moellmann 2000-12-28 16:23:19 +00:00
parent 2ece9174d1
commit 46f6a25854
2 changed files with 19 additions and 3 deletions

View File

@ -1,5 +1,8 @@
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.

View File

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