@vindex title@r{, a frame parameter}
@item title
-If a frame has a non-@code{nil} title, it appears in the window
+If a frame has a non-@code{nil} title, that title appears in the window
system's title bar at the top of the frame, and also in the mode line
of windows in that frame if @code{mode-line-frame-identification} uses
@samp{%F} (@pxref{%-Constructs}). This is normally the case when
Emacs is not using a window system, and can only display one frame at
-a time. @xref{Frame Titles}.
+a time. When Emacs is using a window system, this parameter, if
+non-@code{nil}, overrides the title determined by the @code{name}
+parameter and the implicit title calculated according to
+@code{frame-title-format}. It also overrides the title determined by
+@code{icon-title-format} for iconified frames. @xref{Frame Titles}.
@vindex name@r{, a frame parameter}
@item name
-The name of the frame. The frame name serves as a default for the frame
-title, if the @code{title} parameter is unspecified or @code{nil}. If
-you don't specify a name, Emacs sets the frame name automatically
-(@pxref{Frame Titles}).
+The name of the frame. If you don't specify a name via this
+parameter, Emacs sets the frame name automatically, as specified by
+@code{frame-title-format} and @code{icon-title-format}, and that is
+the frame's title that will appear on display when Emacs uses a window
+system (unless the @code{title} parameter overrides it).
If you specify the frame name explicitly when you create the frame, the
name is also used (instead of the name of the Emacs executable) when
frame is redisplayed.
@defvar frame-title-format
-This variable specifies how to compute a name for a frame when you have
-not explicitly specified one. The variable's value is actually a mode
+This variable specifies how to compute a name for a frame when you
+have not explicitly specified one (via the frame's parameters;
+@pxref{Basic Parameters}). The variable's value is actually a mode
line construct, just like @code{mode-line-format}, except that the
-@samp{%c}, @samp{%C}, and @samp{%l} constructs are ignored. @xref{Mode Line
-Data}.
+@samp{%c}, @samp{%C}, and @samp{%l} constructs are ignored.
+@xref{Mode Line Data}.
@end defvar
@defvar icon-title-format
-This variable specifies how to compute the name for an iconified frame,
-when you have not explicitly specified the frame title. This title
-appears in the icon itself.
+This variable specifies how to compute the name for an iconified frame
+when you have not explicitly specified the frame's name via the
+frame's parameters. The resulting title appears in the frame's icon
+itself. If the value is a string, is should be a mode line construct
+like that of @code{frame-title-format}. The value can also be
+@code{t}, which means to use @code{frame-title-format} instead; this
+avoids problems with some window managers and desktop environments,
+where a change in a frame's title (when a frame is iconified) is
+interpreted as a request to raise the frame and/or give it input
+focus. The default is a string identical to the default value of
+@code{frame-title-format}.
@end defvar
@defvar multiple-frames
Fselect_window (f->selected_window, Qt);
set_buffer_internal_1 (XBUFFER (XWINDOW (f->selected_window)->contents));
- fmt = FRAME_ICONIFIED_P (f) ? Vicon_title_format : Vframe_title_format;
+ fmt = (FRAME_ICONIFIED_P (f) && !EQ (Vicon_title_format, Qt)
+ ? Vicon_title_format : Vframe_title_format);
mode_line_target = MODE_LINE_TITLE;
title_start = MODE_LINE_NOPROP_LEN (0);
DEFVAR_LISP ("icon-title-format", Vicon_title_format,
doc: /* Template for displaying the title bar of an iconified frame.
\(Assuming the window manager supports this feature.)
-This variable has the same structure as `mode-line-format' (which see),
-and is used only on frames for which no explicit name has been set
-\(see `modify-frame-parameters'). */);
+If the value is a string, it should have the same structure
+as `mode-line-format' (which see), and is used only on frames
+for which no explicit name has been set \(see `modify-frame-parameters').
+If the value is t, that means use `frame-title-format' for
+iconified frames. */);
/* Do not nest calls to pure_list. This works around a bug in
Oracle Developer Studio 12.6. */
Lisp_Object icon_title_name_format