[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fix-42655 3c4edfd: Prevent from frozen frame after `C-z' in Lucid builds
From: |
Tino Calancha |
Subject: |
fix-42655 3c4edfd: Prevent from frozen frame after `C-z' in Lucid builds |
Date: |
Sat, 15 Aug 2020 10:18:26 -0400 (EDT) |
branch: fix-42655
commit 3c4edfd85ee8f49e40715a400a1fc65950e07482
Author: Tino Calancha <tino.calancha@gmail.com>
Commit: Tino Calancha <tino.calancha@gmail.com>
Prevent from frozen frame after `C-z' in Lucid builds
Some WMs (e.g. mutter in Gnome Shell) don't unmap iconized windows,
thus we won't get a MapNotify when deconifying them.
Check if we are deconifying a window elsewhere (Bug#42655).
- src/xterm.c (handle_one_xevent):
Check for window deconify when receiving a FocusIn signal.
---
src/xterm.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/xterm.c b/src/xterm.c
index 4439695..a567ab1 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -8762,6 +8762,20 @@ handle_one_xevent (struct x_display_info *dpyinfo,
goto OTHER;
case FocusIn:
+ /* Some WMs (e.g. Mutter in Gnome Shell), don't unmap
+ minimized/iconified windows; thus, for those WMs we won't get
+ a MapNotify when unminimizing/deconifying. Check here if we
+ are deconizing a window (Bug42655). */
+ f = any;
+ if (f && FRAME_ICONIFIED_P (f))
+ {
+ 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);
+ }
+
x_detect_focus_change (dpyinfo, any, event, &inev.ie);
goto OTHER;