all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 24119@debbugs.gnu.org
Subject: bug#24119: 25.1; suspend-frame "freezes" Emacs under i3-wm
Date: Sun, 31 Jul 2016 21:32:28 +0200	[thread overview]
Message-ID: <87vazl61tf.fsf@justinian.turtle-trading.net> (raw)
In-Reply-To: <877fc17kn3.fsf@justinian.turtle-trading.net> (Benjamin Riefenstahl's message of "Sun, 31 Jul 2016 20:00:32 +0200")

Benjamin Riefenstahl writes:
> To speculate, I would guess that Emacs just disables some stuff inside
> iconify-frame, because it expects its request for iconification to be
> honored by the WM.  I will try to trace that further.

iconify-frame calls x_iconify_frame.  This calls in order

  FRAME_DISPLAY_INFO (f)->x_highlight_frame = 0;
  x_set_bitmap_icon (f);
  SET_FRAME_VISIBLE (f, 0);
  SET_FRAME_ICONIFIED (f, true);

I commented these out individually, and the result is that setting
x_highlight_frame causes the cursor to stop blinking and stay hollow and
SET_FRAME_VISIBLE (f,0) causes further keyboard input to be buffered and
not yet executed.  There are three implementations inside this function,
for GTK, for Xt and without any toolkit, but all versions call these
functions.

The GTK documentation says to register for the signal
"window-state-event" to wait for the WM to react.  But Emacs already
handles the underlying relevant X11-Event "UnmappedNotify" and it calls
SET_FRAME_VISIBLE (f, 0) and SET_FRAME_ICONIFIED (f, true) there again.

x_highlight_frame seems to be structured the same as
x_make_frame_visible and x_make_frame_invisible just above it.  I have
not yet investigated where and how those functions are used.

I would suggest to remove the calls to SET_FRAME_VISIBLE and
SET_FRAME_ICONIFIED from x_iconify_frame and to move the setting of
x_highlight_frame to the handling of "UnmappedNotify".  I would do this
for all three implementations of x_iconify_frame.

I just did preliminary tests with the GTK implementation (i.e. USE_GTK)
and with the Mate-WM and it seems to work.  Of course, this would have
to be tested with the other implementations of x_highlight_frame and
with other WMs, at least Gnome 3 and KDE.





      reply	other threads:[~2016-07-31 19:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-31 14:03 bug#24119: 25.1; suspend-frame "freezes" Emacs under i3-wm Benjamin Riefenstahl
2016-07-31 14:22 ` Noam Postavsky
2016-07-31 14:35 ` Eli Zaretskii
2016-07-31 14:57   ` Benjamin Riefenstahl
2016-07-31 16:21     ` Eli Zaretskii
2016-07-31 16:39       ` Eli Zaretskii
2016-07-31 18:00         ` Benjamin Riefenstahl
2016-07-31 19:32           ` Benjamin Riefenstahl [this message]

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=87vazl61tf.fsf@justinian.turtle-trading.net \
    --to=b.riefenstahl@turtle-trading.net \
    --cc=24119@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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.