From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#42655: 27.1; iconify-frame on a Lucid build may stuck the frame Date: Sun, 09 Aug 2020 17:26:08 +0300 Message-ID: <83a6z36glb.fsf@gnu.org> References: <87lfiycihg.fsf@calancha-pc.dy.bbexcite.jp> <83tuxia3x1.fsf@gnu.org> <83lfiu9xes.fsf@gnu.org> <83h7ti9qmb.fsf@gnu.org> <83v9hx7x21.fsf@gnu.org> <874kpgj4z5.fsf@gmail.com> <83sgd08q2v.fsf@gnu.org> <871rkki44t.fsf@gmail.com> <83k0yb999n.fsf@gnu.org> <835z9v80iw.fsf@gnu.org> <87mu36wuch.fsf@gmail.com> <83wo2a7jb1.fsf@gnu.org> <87r1siees8.fsf@gmail.com> <83pn827awm.fsf@gnu.org> <87y2mpmk16.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18828"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42655@debbugs.gnu.org, eggert@cs.ucla.edu, uyennhi.qm@gmail.com, bhavin7392@gmail.com, monnier@iro.umontreal.ca To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 09 16:27:14 2020 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 1k4mI6-0004lT-5D for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 09 Aug 2020 16:27:14 +0200 Original-Received: from localhost ([::1]:49944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k4mI5-0000uC-7X for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 09 Aug 2020 10:27:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4mHv-0000tz-0i for bug-gnu-emacs@gnu.org; Sun, 09 Aug 2020 10:27:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49944) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k4mHu-0004Wr-Lg for bug-gnu-emacs@gnu.org; Sun, 09 Aug 2020 10:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k4mHu-0006P3-GY for bug-gnu-emacs@gnu.org; Sun, 09 Aug 2020 10:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Aug 2020 14:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42655 X-GNU-PR-Package: emacs Original-Received: via spool by 42655-submit@debbugs.gnu.org id=B42655.159698320024583 (code B ref 42655); Sun, 09 Aug 2020 14:27:02 +0000 Original-Received: (at 42655) by debbugs.gnu.org; 9 Aug 2020 14:26:40 +0000 Original-Received: from localhost ([127.0.0.1]:33257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4mHX-0006OR-QZ for submit@debbugs.gnu.org; Sun, 09 Aug 2020 10:26:40 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4mHT-0006O7-4G for 42655@debbugs.gnu.org; Sun, 09 Aug 2020 10:26:38 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60606) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k4mHM-0004S7-F7; Sun, 09 Aug 2020 10:26:28 -0400 Original-Received: from [176.228.60.248] (port=2717 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1k4mHJ-0002PB-Q1; Sun, 09 Aug 2020 10:26:26 -0400 In-Reply-To: <87y2mpmk16.fsf@gmail.com> (message from Tino Calancha on Sat, 08 Aug 2020 13:52:53 +0200) 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:184427 Archived-At: > From: Tino Calancha > Cc: 42655@debbugs.gnu.org, eggert@cs.ucla.edu, uyennhi.qm@gmail.com, > bhavin7392@gmail.com, monnier@iro.umontreal.ca > Date: Sat, 08 Aug 2020 13:52:53 +0200 > > Eli Zaretskii writes: > > > Does anyone here have a clue why we don't get MapNotify in the GNOME > > Shell case? > All window managers I have tested so far (except Gnome Shell) agree on the > following: > > they send a 'VisibilityNotify event' when you select back the previously > iconified window. Our code expects MapNotify. My reading of the code in xterm.c is that we do nothing special when we receive VisibilityNotify. I see in xterm.c that we already have some special treatment of the Gnome Shell, see below. Could you please put a breakpoint there, and tell why we don't set the frame's visible flag and don't reset its iconified flag when the PropertyNotify event is received? Your event log seems to indicate we get quite a few of PropertyNotify events when the frame is de-iconified. > Here is the comparison between window managers. > for easier navigations, I recommend to copy the > following lines and display it inside Emacs in a org mode buffer: Thanks, this is very useful. Here's the snippet from xterm.c that deals with PropertyNotify: case PropertyNotify: x_display_set_last_user_time (dpyinfo, event->xproperty.time); f = x_top_window_to_frame (dpyinfo, event->xproperty.window); if (f && event->xproperty.atom == dpyinfo->Xatom_net_wm_state) { bool not_hidden = x_handle_net_wm_state (f, &event->xproperty); if (not_hidden && FRAME_ICONIFIED_P (f)) { /* 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_VISIBLE (f, 1); SET_FRAME_ICONIFIED (f, false); f->output_data.x->has_been_visible = true; inev.ie.kind = DEICONIFY_EVENT; XSETFRAME (inev.ie.frame_or_window, f); } else if (! not_hidden && ! FRAME_ICONIFIED_P (f)) { SET_FRAME_VISIBLE (f, 0); SET_FRAME_ICONIFIED (f, true); inev.ie.kind = ICONIFY_EVENT; XSETFRAME (inev.ie.frame_or_window, f); } } x_handle_property_notify (&event->xproperty); xft_settings_event (dpyinfo, event); goto OTHER;