all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Tino Calancha <tino.calancha@gmail.com>
Cc: 42655@debbugs.gnu.org, eggert@cs.ucla.edu, uyennhi.qm@gmail.com,
	bhavin7392@gmail.com, monnier@iro.umontreal.ca
Subject: bug#42655: 27.1; iconify-frame on a Lucid build may stuck the frame
Date: Sun, 09 Aug 2020 17:26:08 +0300	[thread overview]
Message-ID: <83a6z36glb.fsf@gnu.org> (raw)
In-Reply-To: <87y2mpmk16.fsf@gmail.com> (message from Tino Calancha on Sat, 08 Aug 2020 13:52:53 +0200)

> From: Tino Calancha <tino.calancha@gmail.com>
> 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 <eliz@gnu.org> 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;





  reply	other threads:[~2020-08-09 14:26 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-01 18:46 bug#42655: 27.1; iconify-frame on a Lucid build may stuck the frame Tino Calancha
2020-08-01 18:53 ` Eli Zaretskii
2020-08-02 13:07 ` Tino Calancha
2020-08-02 14:34   ` Eli Zaretskii
2020-08-03 19:46     ` Tino Calancha
2020-08-03 21:29       ` Stefan Monnier
2020-08-04  2:21       ` Eli Zaretskii
2020-08-04  3:59         ` Eli Zaretskii
2020-08-04 14:20           ` Eli Zaretskii
2020-08-04 15:14             ` Bhavin Gandhi
2020-08-04 16:40               ` Eli Zaretskii
2020-08-04 18:53                 ` Bhavin Gandhi
2020-08-04 19:07                   ` Eli Zaretskii
2020-08-05 17:23                     ` Bhavin Gandhi
2020-08-05 18:43                       ` Eli Zaretskii
2020-08-05 18:57                         ` Tino Calancha
2020-08-06  2:29                           ` Eli Zaretskii
2020-08-06  5:41                             ` Bhavin Gandhi
2020-08-06  7:43                               ` Eli Zaretskii
2020-08-06  8:13                                 ` Tino Calancha
2020-08-06 13:47                                   ` Eli Zaretskii
2020-08-06 13:57                                     ` Eli Zaretskii
2020-08-06 14:18                                       ` Tino Calancha
2020-08-06 14:37                                     ` Tino Calancha
2020-08-07  5:53                                       ` Eli Zaretskii
2020-08-07 11:47                                         ` Tino Calancha
2020-08-07 12:05                                           ` Eli Zaretskii
2020-08-07 12:20                                             ` Bhavin Gandhi
2020-08-07 14:01                                             ` Tino Calancha
2020-08-07 15:06                                               ` Eli Zaretskii
2020-08-08 11:52                                                 ` Tino Calancha
2020-08-09 14:26                                                   ` Eli Zaretskii [this message]
2020-08-10 17:52                                                     ` Tino Calancha
2020-08-12 16:50                                                       ` Eli Zaretskii
2020-08-15 14:23                                                         ` Tino Calancha
2020-08-05 18:24               ` Tino Calancha
2020-08-05 18:31                 ` Bhavin Gandhi
2020-08-05 18:34                   ` Tino Calancha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83a6z36glb.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=42655@debbugs.gnu.org \
    --cc=bhavin7392@gmail.com \
    --cc=eggert@cs.ucla.edu \
    --cc=monnier@iro.umontreal.ca \
    --cc=tino.calancha@gmail.com \
    --cc=uyennhi.qm@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.