From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#49959: 28.0.50; Emacs got quasi freeze Date: Tue, 24 Aug 2021 11:41:52 +0200 Message-ID: <35b2918d-5755-01e0-ecc9-ec543ee83299@gmx.at> References: <87r1f3vv5r.wl-m.nomiya@gmail.com> <8735r3idtj.wl-nomiya@galaxy.dti.ne.jp> <871r6ni8z5.wl-nomiya@galaxy.dti.ne.jp> <824dbfdc-e25a-5884-69a0-e5d4e9bc9d48@gmx.at> <1df6be5b-7041-d70f-1ae7-8e792b8147b5@gmx.at> <87ilzxdqhi.wl-nomiya@galaxy.dti.ne.jp> <87o89nmyfr.wl-nomiya@galaxy.dti.ne.jp> <87mtp78pzk.wl-nomiya@galaxy.dti.ne.jp> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------ED10111E0D622541B8D5D597" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3718"; mail-complaints-to="usenet@ciao.gmane.io" To: m.nomiya@gmail.com, 49959@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 24 11:43:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mISxa-0000pK-48 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Aug 2021 11:43:10 +0200 Original-Received: from localhost ([::1]:46044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mISxY-0004sF-0W for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Aug 2021 05:43:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mISxS-0004rp-8J for bug-gnu-emacs@gnu.org; Tue, 24 Aug 2021 05:43:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59959) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mISxS-0007aO-0U for bug-gnu-emacs@gnu.org; Tue, 24 Aug 2021 05:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mISxR-0001E7-UM for bug-gnu-emacs@gnu.org; Tue, 24 Aug 2021 05:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Aug 2021 09:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 49959-submit@debbugs.gnu.org id=B49959.16297981224611 (code B ref 49959); Tue, 24 Aug 2021 09:43:01 +0000 Original-Received: (at 49959) by debbugs.gnu.org; 24 Aug 2021 09:42:02 +0000 Original-Received: from localhost ([127.0.0.1]:43269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mISwT-0001C5-Kx for submit@debbugs.gnu.org; Tue, 24 Aug 2021 05:42:02 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:46117) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mISwR-0001Bg-ES for 49959@debbugs.gnu.org; Tue, 24 Aug 2021 05:42:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1629798113; bh=FprYwQ3OMnbqAYocvaWt2R6yVYR76CqK7bi1a0Wr6zQ=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=IlUzUHfrezSamea9gQr85k7rjPAgA348qzBa+fM4oFa8di3YGO8PgLeX5vIThY1GO F1AmefPHz5FPxVJwEE0IzmgriDioDRAQctKyW7XoDd5ozfVsSWJstzFOd2jpcUklCM xPnQWC+KDSWT43yImy/Rpb6oeg+GpxRa6GOPJw5M= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([212.95.5.186]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M72oH-1mOl8o0En9-008aRq; Tue, 24 Aug 2021 11:41:53 +0200 In-Reply-To: <87mtp78pzk.wl-nomiya@galaxy.dti.ne.jp> Content-Language: en-US X-Provags-ID: V03:K1:zK5dA+8g9pGO3U/2zvbPkjDXKM47OiEWYhms85B7ci+RnCr8Z4J 0UTnZj36kGRJT+BsjsdV/9PVZk2LMDz01mFK7gic44RJCbvgFzt3mwruiGj7kXEFD1J8Vys u5k+gMyN6glKrgTR3H39FUAX1pkG0R0crheeQUGIIvNGVBztqWjwS/CrkEYtTynGuOEhI4j WlKam3UmkN6KLQY2Lf9vg== X-UI-Out-Filterresults: notjunk:1;V03:K0:XtTe1IGS5CM=:V3rTE0AtrFpcxLJRNsrlLC 9z8H0fRw5yPGmNW4bdswQUC1LF93c+oHA6wb/CpTWL6Fot82EiPRo0NNYl5NkzSD+7f/BmMVt 0Uq2taaCt6eAp13dY0tkufZgO1KoHLfhlJ6lLSf2cCAgjoABfuINyTHrT/fLMMyxFnw0yAp1x FcaVsTndmpilCwtQcX+PhT5wj6YMsdUm5r0TaMWxU9idigWlTlka7VaZ++XrVaPVywkWmfPI6 32UeFxwDrT1kQbYVy2XRDp6pNbDCeYxXHFt/1NYzoxmw13zB5kjorS43tnk1IXVZCOnf/DGof TrKePvrg44C/ub44szVrIXvIJPZlHcqgG6qM9TT3Mc9UVlQ8wcjb39tQ8gp72ILDvSBt27WHe 81Lwtq8n4gYYr7oCxklEDLhFlRn4RsWSJqmzOyEy+gGtII+2XSBvDJ+sytgauacj77wcEzywe Qk3zITqGkSnTS9eUIKMqnv1RPp6PglLpNUO4rFHlc0xiyw63lalVS2EZuEAzhSEuA4QvOvGW6 J4vmvnCAXpFsptMG3D0tfn6vlNUfoKB2WT5rsuejdR+rY1euSrz/ZN/BMUA5fw1rw9XeGo3nY dtlLbBNgw8LZYaR0zInfIUOR0MLqoUrFBDpu6BPV1pduHz++MVrCvmwcz38gsRVSiseOEkDI/ Ku0t3vH5+FKWYcgfN+2w0x/yX6mGMB3KSlAk4hlcgJ8+1qdHi18w7i7B89LtACyCZ3wvP17KE LeJzTdWkS6bwoRfwuPKDeXCO++BdAgFS2zogzkj5E17/zhNEn+nmi4YGLdXApkVHPAiYaXD6 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:212530 Archived-At: This is a multi-part message in MIME format. --------------ED10111E0D622541B8D5D597 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit > That is, when > > Tue Aug 24 12:37:39 JST 2021 > _NET_WM_STATE(ATOM) = _NET_WM_STATE_HIDDEN > > appears, it doesn't start rendering (= enlightenment doesn't remove > this property). So it _is_ a PropertyNotify event we should react to. I'll attach yet another patch to that purpose. martin --------------ED10111E0D622541B8D5D597 Content-Type: text/x-patch; name="enlightenment.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="enlightenment.diff" diff --git a/src/termhooks.h b/src/termhooks.h index 1d3cdc8fe8..479b8a1c29 100644 =2D-- a/src/termhooks.h +++ b/src/termhooks.h @@ -168,7 +168,8 @@ #define EMACS_TERMHOOKS_H Lisp-level event value. (Only the toolkit version uses these.) */ ICONIFY_EVENT, /* An X client iconified this window. */ - DEICONIFY_EVENT, /* An X client deiconified this window. */ + DEICONIFY_EVENT, /* An X client deiconified this window + or made it visible. */ MENU_BAR_ACTIVATE_EVENT, /* A button press in the menu bar (toolkit version only). */ DRAG_N_DROP_EVENT, /* A drag-n-drop event is generated when diff --git a/src/xterm.c b/src/xterm.c index 6c6a62adb2..82d2ae3a52 100644 =2D-- a/src/xterm.c +++ b/src/xterm.c @@ -8166,22 +8166,19 @@ handle_one_xevent (struct x_display_info *dpyinfo, f =3D x_top_window_to_frame (dpyinfo, event->xproperty.window); if (f && event->xproperty.atom =3D=3D dpyinfo->Xatom_net_wm_state) { + bool was_iconified =3D FRAME_ICONIFIED_P (f); bool not_hidden =3D x_handle_net_wm_state (f, &event->xproperty= ); - if (not_hidden && FRAME_ICONIFIED_P (f)) + if (not_hidden) { if (CONSP (frame_size_history)) frame_size_history_plain - (f, build_string ("PropertyNotify, not hidden & iconified")); + (f, build_string ("PropertyNotify, not hidden")); - /* Gnome shell does not iconify us when C-z is pressed. - It hides the frame. So if our state says we aren't - hidden anymore, treat it as deiconified. */ + SET_FRAME_GARBAGED (f); SET_FRAME_VISIBLE (f, 1); - SET_FRAME_ICONIFIED (f, false); - f->output_data.x->has_been_visible =3D true; - inev.ie.kind =3D DEICONIFY_EVENT; + #if defined USE_GTK && defined HAVE_GTK3 /* If GTK3 wants to impose some old size here (Bug#24526), tell it that the current size is what we want. */ @@ -8192,18 +8189,27 @@ handle_one_xevent (struct x_display_info *dpyinfo, f->was_invisible =3D false; } #endif - XSETFRAME (inev.ie.frame_or_window, f); + if (was_iconified) + { + SET_FRAME_ICONIFIED (f, false); + inev.ie.kind =3D DEICONIFY_EVENT; + XSETFRAME (inev.ie.frame_or_window, f); + } } - else if (!not_hidden && !FRAME_ICONIFIED_P (f)) + else { if (CONSP (frame_size_history)) frame_size_history_plain - (f, build_string ("PropertyNotify, hidden & not iconified")); + (f, build_string ("PropertyNotify, hidden")); SET_FRAME_VISIBLE (f, 0); - SET_FRAME_ICONIFIED (f, true); - inev.ie.kind =3D ICONIFY_EVENT; - XSETFRAME (inev.ie.frame_or_window, f); + + if (!was_iconified) + { + SET_FRAME_ICONIFIED (f, true); + inev.ie.kind =3D ICONIFY_EVENT; + XSETFRAME (inev.ie.frame_or_window, f); + } } } @@ -8402,7 +8408,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, f =3D x_top_window_to_frame (dpyinfo, event->xmap.window); if (f) { - bool iconified =3D FRAME_ICONIFIED_P (f); + bool was_iconified =3D FRAME_ICONIFIED_P (f); int value; bool sticky; bool not_hidden =3D x_get_current_wm_state (f, event->xmap.wind= ow, &value, &sticky); @@ -8410,7 +8416,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (CONSP (frame_size_history)) frame_size_history_extra (f, - iconified + was_iconified ? (not_hidden ? build_string ("MapNotify, not hidden & iconified") : build_string ("MapNotify, hidden & iconified")) @@ -8434,7 +8440,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, #endif /* Not USE_GTK */ } - if (!iconified) + if (!was_iconified) { /* The `z-group' is reset every time a frame becomes invisible. Handle this here. */ @@ -8459,13 +8465,13 @@ handle_one_xevent (struct x_display_info *dpyinfo, } #endif f->output_data.x->has_been_visible =3D true; - } - if (not_hidden && iconified) - { - inev.ie.kind =3D DEICONIFY_EVENT; - XSETFRAME (inev.ie.frame_or_window, f); - } + if (was_iconified) + { + inev.ie.kind =3D DEICONIFY_EVENT; + XSETFRAME (inev.ie.frame_or_window, f); + } + } } goto OTHER; @@ -9354,7 +9360,21 @@ handle_one_xevent (struct x_display_info *dpyinfo, f =3D x_top_window_to_frame (dpyinfo, event->xvisibility.window); if (f && (event->xvisibility.state =3D=3D VisibilityUnobscured || event->xvisibility.state =3D=3D VisibilityPartiallyObscured)) - SET_FRAME_VISIBLE (f, 1); + { +#if defined USE_GTK && defined HAVE_GTK3 + /* If GTK3 wants to impose some old size here (Bug#24526), + tell it that the current size is what we want. */ + if (f->was_invisible) + { + xg_frame_set_char_size + (f, FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f)); + f->was_invisible =3D false; + } +#endif + f->output_data.x->has_been_visible =3D true; + SET_FRAME_GARBAGED (f); + SET_FRAME_VISIBLE (f, 1); + } goto OTHER; --------------ED10111E0D622541B8D5D597--