From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: asjo@koldfront.dk (Adam =?iso-8859-1?Q?Sj=F8gren?=) Newsgroups: gmane.emacs.devel,gmane.comp.gnome.gtk+.general Subject: Re: Emacs --with-x-toolkit=gtk3 - iconify, move mouse over icon -> crash Date: Wed, 12 Oct 2011 22:22:57 +0200 Organization: koldfront - analysis & revolution, Copenhagen, Denmark Message-ID: <87zkh62c4e.fsf@topper.koldfront.dk> References: <87obxmicsg.fsf@topper.koldfront.dk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1318451008 25213 80.91.229.12 (12 Oct 2011 20:23:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 12 Oct 2011 20:23:28 +0000 (UTC) Cc: gtk-list@gnome.org To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 12 22:23:24 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RE5Kl-0000AQ-KG for ged-emacs-devel@m.gmane.org; Wed, 12 Oct 2011 22:23:24 +0200 Original-Received: from localhost ([::1]:41154 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RE5Kl-0001O1-3h for ged-emacs-devel@m.gmane.org; Wed, 12 Oct 2011 16:23:23 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:46135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RE5Ki-0001Nk-TT for emacs-devel@gnu.org; Wed, 12 Oct 2011 16:23:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RE5Kh-0003Io-PW for emacs-devel@gnu.org; Wed, 12 Oct 2011 16:23:20 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:40882) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RE5Kh-0003Ik-Ff for emacs-devel@gnu.org; Wed, 12 Oct 2011 16:23:19 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RE5Kg-00007G-P7 for emacs-devel@gnu.org; Wed, 12 Oct 2011 22:23:18 +0200 Original-Received: from 2505ds5-by.0.fullrate.dk ([95.166.24.143]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Oct 2011 22:23:18 +0200 Original-Received: from asjo by 2505ds5-by.0.fullrate.dk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Oct 2011 22:23:18 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 47 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 2505ds5-by.0.fullrate.dk Mail-Copies-To: never X-Now-Playing: =?iso-8859-1?Q?J=F8rgen?= eller Palle, Det store triumftog (cd 5) (Monrad & Rislund) X-Face: )qY&CseJ?.:=8F#^~GcSA?F=9eu'{KAFfL1C3/A&:nE?PW\i65"ba0NS)97, Q(^@xk}n4Ou rPuR#V8I(J_@~H($[ym:`K_+]*kjvW>xH5jbgLBVFGXY:(#4P>zVBklLbdL&XxL\M)%T}3S/IS9lMJ ^St'=VZBR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:145052 gmane.comp.gnome.gtk+.general:24051 Archived-At: 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 . */ #ifdef USE_GTK #include "gtkutil.h" +#ifdef HAVE_GTK3 +#include +#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" asjo@koldfront.dk