[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: |
Jan Djärv |
Subject: |
Re: Emacs --with-x-toolkit=gtk3 - iconify, move mouse over icon -> crash |
Date: |
Sun, 30 Oct 2011 19:09:01 +0100 |
Hello.
I installed the patch with tiny modifications.
Jan D.
12 okt 2011 kl. 22:22 skrev Adam Sjøgren:
> 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
>