aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-12-28 16:23:19 +0000
committerGerd Moellmann2000-12-28 16:23:19 +0000
commit46f6a2585461878660811a7eb3d03451599f90f3 (patch)
treebdf5fd16a59b34bc4d3fec78941e4784b5001ad6 /src
parent2ece9174d1f57d48229b4cbd3d1d932df40687ed (diff)
downloademacs-46f6a2585461878660811a7eb3d03451599f90f3.tar.gz
emacs-46f6a2585461878660811a7eb3d03451599f90f3.zip
(Fx_backspace_delete_keys_p): Check library and server
XKB versions. Call XkbFreeKeyboard with 2nd arg 0.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/xfns.c19
2 files changed, 19 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f45bd817935..64d2bbf7d9f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
12000-12-28 Gerd Moellmann <gerd@gnu.org> 12000-12-28 Gerd Moellmann <gerd@gnu.org>
2 2
3 * xfns.c (Fx_backspace_delete_keys_p): Check library and server
4 XKB versions. Call XkbFreeKeyboard with 2nd arg 0.
5
3 * keyboard.c (echo_char): If C is an integer, always call 6 * keyboard.c (echo_char): If C is an integer, always call
4 push_key_description. Former code could signal an invalid 7 push_key_description. Former code could signal an invalid
5 character error. 8 character error.
diff --git a/src/xfns.c b/src/xfns.c
index 6e8931b42d7..b52f7fef7c0 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -11096,10 +11096,23 @@ usual X keysyms.")
11096 struct frame *f = check_x_frame (frame); 11096 struct frame *f = check_x_frame (frame);
11097 Display *dpy = FRAME_X_DISPLAY (f); 11097 Display *dpy = FRAME_X_DISPLAY (f);
11098 Lisp_Object have_keys; 11098 Lisp_Object have_keys;
11099 11099 int major, minor, op, event, error;
11100 have_keys = Qnil;
11101 11100
11102 BLOCK_INPUT; 11101 BLOCK_INPUT;
11102
11103 /* Check library version in case we're dynamically linked. */
11104 major = XkbMajorVersion;
11105 minor = XkbMinorVersion;
11106 if (!XkbLibraryVersion (&major, &minor))
11107 return Qnil;
11108
11109 /* Check that the server supports XKB. */
11110 major = XkbMajorVersion;
11111 minor = XkbMinorVersion;
11112 if (!XkbQueryExtension (dpy, &op, &event, &error, &major, &minor))
11113 return Qnil;
11114
11115 have_keys = Qnil;
11103 kb = XkbGetKeyboard (dpy, XkbAllComponentsMask, XkbUseCoreKbd); 11116 kb = XkbGetKeyboard (dpy, XkbAllComponentsMask, XkbUseCoreKbd);
11104 if (kb) 11117 if (kb)
11105 { 11118 {
@@ -11118,7 +11131,7 @@ usual X keysyms.")
11118 backspace_keycode = i; 11131 backspace_keycode = i;
11119 } 11132 }
11120 11133
11121 XkbFreeKeyboard (kb, XkbAllComponentsMask, True); 11134 XkbFreeKeyboard (kb, 0, True);
11122 11135
11123 if (delete_keycode 11136 if (delete_keycode
11124 && backspace_keycode 11137 && backspace_keycode