diff options
author | Jan Djärv <jan.h.d@swipnet.se> | 2011-10-30 19:04:13 +0100 |
---|---|---|
committer | Jan Djärv <jan.h.d@swipnet.se> | 2011-10-30 19:04:13 +0100 |
commit | 6e56383b5703464b71707387408c141d0e9f2e3c (patch) | |
tree | bc31beda556237f8c594d769e3b23e0ed72dc512 | |
parent | 3b574623e9ae5c67a9b7f6e94178e346a97733ff (diff) | |
download | emacs-6e56383b5703464b71707387408c141d0e9f2e3c.tar.gz |
Fix bug 9869.
xterm.c: Include X11/Xproto.h if HAVE_GTK3.
(x_error_handler): Ignore BadMatch for X_SetInputFocus for
HAVE_GTK3 (Bug#9869).
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/xterm.c | 12 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ea367bd77d5..9f8fa94d481 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,8 @@ -2011-10-30 Jan Djärv <jan.h.d@swipnet.se> +2011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change) + + * xterm.c: Include X11/Xproto.h if HAVE_GTK3. + (x_error_handler): Ignore BadMatch for X_SetInputFocus for + HAVE_GTK3 (Bug#9869). * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize type to GDK_NOTHING so valgrind does not complain (Bug#9901). diff --git a/src/xterm.c b/src/xterm.c index 2275e5b6a73..fb77faa75fe 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -93,6 +93,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #ifdef USE_GTK #include "gtkutil.h" +#ifdef HAVE_GTK3 +#include <X11/Xproto.h> +#endif #endif #ifdef USE_LUCID @@ -7869,6 +7872,15 @@ static void x_error_quitter (Display *, XErrorEvent *); static int x_error_handler (Display *display, XErrorEvent *event) { +#ifdef HAVE_GTK3 + if (event->error_code == BadMatch + && event->request_code == X_SetInputFocus + && event->minor_code == 0) + { + return 0; + } +#endif + if (x_error_message) x_error_catcher (display, event); else |