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)
This commit is contained in:
parent
39d2efbfae
commit
e99f41f03a
3 changed files with 24 additions and 3 deletions
|
@ -3470,6 +3470,7 @@ extern void expose_frame (struct frame *, int, int, int, int);
|
|||
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);
|
||||
|
|
24
src/frame.h
24
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;
|
||||
|
|
|
@ -13148,7 +13148,7 @@ store_mode_line_noprop (const char *string, int field_width, int precision)
|
|||
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue