bell does not work (#526719)

This commit is contained in:
Petr Hracek 2013-03-28 15:14:12 +01:00
parent 1dde37e57e
commit 32580573e9
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,39 @@
diff --git a/configure.in b/configure.in
index 2b0b2f7..68459bc 100644
--- a/configure.in
+++ b/configure.in
@@ -1843,6 +1843,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 \
diff --git a/src/xterm.c b/src/xterm.c
index 9ce1668..67ad919 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -139,6 +139,10 @@ extern void _XEditResCheckMessages (Widget, XtPointer, XEvent *, Boolean *);
#endif
#endif
+#ifdef HAVE_XKB
+#include <X11/XKBlib.h>
+#endif
+
/* Default to using XIM if available. */
#ifdef USE_XIM
int use_xim = 1;
@@ -3238,7 +3242,11 @@ XTring_bell (struct frame *f)
#endif
{
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;
}

View File

@ -24,6 +24,8 @@ Patch8: emacs-locate-library.patch
Patch9: emacs-bz11580-eudc-bbdb.patch
# Fix for emacs bug #922519
Patch10: emacs-style-change-cb.patch
# Fix for emacs bug #922519
Patch11: emacs-bell-dont-work.patch
# Fix for emacs bug #13460.
Patch100: emacs-24.2-hunspell.patch
@ -163,6 +165,7 @@ packages that add functionality to Emacs.
%patch9 -p1 -b .emacs-bz11580-eudc-bbdb
%patch10 -p1 -b .style-change-cb.patch
%patch11 -p1 -b .bell-dont-work.patch
%patch100 -p1 -b .hunspell
@ -444,6 +447,7 @@ update-desktop-database &> /dev/null || :
%changelog
* Thu Mar 28 2013 Petr Hracek <phracek@redhat.com> - 1:24.2-15
- Fix for emacs bug 112144, style_changed_cb (#922519)
- Fix for emacs bug 112131, bell does not work (#526719)
* Tue Mar 26 2013 Petr Hracek <phracek@redhat.com> - 1:24.2-14
- fixing distribution flags to rhel instead of el6:1