[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs --with-x-toolkit=gtk3 - iconify, move mouse over icon -> crash
From: |
Adam Sjøgren |
Subject: |
Re: Emacs --with-x-toolkit=gtk3 - iconify, move mouse over icon -> crash |
Date: |
Wed, 12 Oct 2011 22:22:57 +0200 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) |
On Wed, 12 Oct 2011 15:01:51 +0200, I wrote:
> When I compile emacs with gtk3 I get a crash if I iconify the Emacs
> window and move the mouse over the icon.
[...]
The attached trivial patch avoids the crash for me. I wonder if gtk3
should be catching those X errors as gtk2 seemed to, if Emacs should
handle them itself, or something else?
diff --git a/src/xterm.c b/src/xterm.c
index 4d3b572..c8b6771 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
@@ -7848,6 +7851,13 @@ 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) {
+ fprintf(stderr, "Ignoring XErrorEvent(BadMatch X_SetInputFocus) serial:
%ul\n", event->serial);
+ return 0;
+ }
+#endif
+
if (x_error_message)
x_error_catcher (display, event);
else
Best regards,
Adam
--
"Gav Adam Sjøgren
Strik" address@hidden