From 602552d774c00cc68a967ad339de466855468d81 Mon Sep 17 00:00:00 2001 From: Petr Hracek Date: Mar 28 2013 11:50:09 +0000 Subject: Fix for emacs bug 112131, bell does not work (#526719) --- diff --git a/emacs-bell-dont-work.patch b/emacs-bell-dont-work.patch new file mode 100644 index 0000000..36d904c --- /dev/null +++ b/emacs-bell-dont-work.patch @@ -0,0 +1,39 @@ +diff --git a/configure.ac b/configure.ac +index 62f53a3..a6f2f04 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1874,6 +1874,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 fb407c8..102ce43 100644 +--- a/src/xterm.c ++++ b/src/xterm.c +@@ -130,6 +130,10 @@ extern void _XEditResCheckMessages (Widget, XtPointer, XEvent *, Boolean *); + + #include "bitmaps/gray.xbm" + ++#ifdef HAVE_XKB ++#include ++#endif ++ + /* Default to using XIM if available. */ + #ifdef USE_XIM + int use_xim = 1; +@@ -3243,7 +3247,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 (); + } diff --git a/emacs.spec b/emacs.spec index f3f01ad..789455e 100644 --- a/emacs.spec +++ b/emacs.spec @@ -21,6 +21,8 @@ Patch7: emacs-spellchecker.patch # Fix for emacs bug #922519 Patch10: emacs-style-change-cb.patch +# Fix for emacs bug #562719 +Patch11: emacs-bell-dont-work.patch # Fix for emacs bug #13460. Patch100: emacs-24.3-hunspell.patch @@ -158,6 +160,7 @@ packages that add functionality to Emacs. %patch7 -p1 -b .spellchecker %patch10 -p1 -b .style-change-cb.patch +%patch11 -p1 -b .bell-dont-work.patch %patch100 -p1 -b .hunspell @@ -441,6 +444,7 @@ update-desktop-database &> /dev/null || : %changelog * Thu Mar 28 2013 Petr Hracek - 1:24.3-3 - Fix for emacs bug 112144, style_changed_cb (#922519) +- Fix for emacs bug 112131, bell does not work (#562719) * Mon Mar 18 2013 Petr Hracek - 1:24.3-2 - fix #927996 correcting bug. Info pages were not delivered