summaryrefslogtreecommitdiff
path: root/src/frame.h
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-06-09 21:48:19 +0800
committerPo Lu <luangruo@yahoo.com>2022-06-09 21:50:37 +0800
commite99f41f03a97641ee05ba4a27f8b91c190f55df1 (patch)
treeb8bb2ab447143124982557c01875c327e85f47dc /src/frame.h
parent39d2efbfae1dc081258a764f3c47f5f492f38fec (diff)
downloademacs-e99f41f03a97641ee05ba4a27f8b91c190f55df1.tar.gz
Fix recalculation of `icon-title-format' after a frame is iconified
Previously it would only happen upon the next mode line redisplay, meaning that just pressing C-z would not update the implicit title, since C-z doesn't cause a redisplay. * src/dispextern.h: Update prototypes. * src/frame.h (SET_FRAME_ICONIFIED): De-slugify. Call `gui_consider_frame_title', since `icon-title-format' might be different from the current frame title. * src/xdisp.c (gui_consider_frame_title): Export (also in dispextern.h). (bug#55850)
Diffstat (limited to 'src/frame.h')
-rw-r--r--src/frame.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/frame.h b/src/frame.h
index a164853e09d..458b6257e49 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -1293,8 +1293,28 @@ SET_FRAME_VISIBLE (struct frame *f, int v)
}
/* Set iconified status of frame F. */
-#define SET_FRAME_ICONIFIED(f, i) \
- (f)->iconified = (eassert (0 <= (i) && (i) <= 1), (i))
+INLINE void
+SET_FRAME_ICONIFIED (struct frame *f, int i)
+{
+#ifdef HAVE_WINDOW_SYSTEM
+ Lisp_Object frame;
+#endif
+
+ eassert (0 <= (i) && (i) <= 1);
+
+ f->iconified = i;
+
+#ifdef HAVE_WINDOW_SYSTEM
+ /* Iconifying a frame might cause the frame title to change if no
+ title was explicitly specified. Force the frame title to be
+ recomputed. */
+
+ XSETFRAME (frame, f);
+
+ if (FRAME_WINDOW_P (f))
+ gui_consider_frame_title (frame);
+#endif
+}
extern Lisp_Object selected_frame;
extern Lisp_Object old_selected_frame;