]> git.eshelyaron.com Git - emacs.git/commitdiff
* configure.ac (HAVE_XKB): Define if Xkb is present.
authorJan Djärv <jan.h.d@swipnet.se>
Mon, 25 Mar 2013 17:58:35 +0000 (18:58 +0100)
committerJan Djärv <jan.h.d@swipnet.se>
Mon, 25 Mar 2013 17:58:35 +0000 (18:58 +0100)
* src/xterm.c: Include X11/XKBlib.h
(XTring_bell): Use XkbBell if HAVE_XKB.

Fixes: debbugs:14041
ChangeLog
configure.ac
src/xterm.c

index d6626d4df10fb9c2c111f19cbe8ea819c81b4f2f..3d01040ca96c4eace26f649b78f6e1ae9fc6473b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-03-25  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * configure.ac (HAVE_XKB): Define if Xkb is present.
+
 2013-03-24  Paul Eggert  <eggert@cs.ucla.edu>
 
        Merge from gnulib, incorporating:
index d6c730c5033d87033fd66b1744e054e4c5f801ab..1c5c1725dab5a2b4abbe91ee6e81038d4ae8137e 100644 (file)
@@ -1822,6 +1822,7 @@ if test "${HAVE_X11}" = "yes"; then
   AC_MSG_RESULT($emacs_xkb)
   if test $emacs_xkb = yes; then
     AC_DEFINE(HAVE_XKBGETKEYBOARD, 1, [Define to 1 if you have the XkbGetKeyboard function.])
+    AC_DEFINE(HAVE_XKB, 1, [Define to 1 if you have the Xkb extension.])
   fi
 
   AC_CHECK_FUNCS(XrmSetDatabase XScreenResourceString \
index d8c2dfdda82db3797f85dbb45e88872c2b3453b0..e4a681031ef5b881724686b7ce17c44c98691f83 100644 (file)
@@ -130,6 +130,10 @@ extern void _XEditResCheckMessages (Widget, XtPointer, XEvent *, Boolean *);
 
 #include "bitmaps/gray.xbm"
 
+#ifdef HAVE_XKB
+#include <X11/XKBlib.h>
+#endif
+
 /* Default to using XIM if available.  */
 #ifdef USE_XIM
 int use_xim = 1;
@@ -3218,7 +3222,11 @@ XTring_bell (struct frame *f)
       else
        {
          block_input ();
+#ifdef HAVE_XKB
+          XkbBell (FRAME_X_DISPLAY (f), None, 0, None);
+#else
          XBell (FRAME_X_DISPLAY (f), 0);
+#endif
          XFlush (FRAME_X_DISPLAY (f));
          unblock_input ();
        }