GNU bug report logs - #24119
25.1; suspend-frame "freezes" Emacs under i3-wm

Previous Next

Package: emacs;

Reported by: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>

Date: Sun, 31 Jul 2016 14:04:02 UTC

Severity: normal

Found in version 25.1

Full log


View this message in rfc822 format

From: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 24119 <at> debbugs.gnu.org
Subject: bug#24119: 25.1; suspend-frame "freezes" Emacs under i3-wm
Date: Sun, 31 Jul 2016 21:32:28 +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.




This bug report was last modified 8 years and 320 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.