extern bool gui_intersect_rectangles (const Emacs_Rectangle *,
const Emacs_Rectangle *,
Emacs_Rectangle *);
+extern void gui_consider_frame_title (Lisp_Object);
#endif /* HAVE_WINDOW_SYSTEM */
extern void note_mouse_highlight (struct frame *, int, int);
}
/* 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;
Vicon_title_format if FRAME is iconified, otherwise it is
frame_title_format. */
-static void
+void
gui_consider_frame_title (Lisp_Object frame)
{
struct frame *f = XFRAME (frame);