changeset 11767:4166c8ea623d

(x_consider_frame_title): When setting multiple_frames, ignore invisible frames and frames on other displays.
author Karl Heuer <kwzh@gnu.org>
date Tue, 09 May 1995 02:38:03 +0000
parents 1877e9736ea1
children 8f49fc89adcc
files src/xdisp.c
diffstat 1 files changed, 21 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Tue May 09 02:25:50 1995 +0000
+++ b/src/xdisp.c	Tue May 09 02:38:03 1995 +0000
@@ -624,7 +624,23 @@
 
   if (!FRAME_X_P (f) || FRAME_MINIBUF_ONLY_P (f) || f->explicit_name)
     return;
-  multiple_frames = !EQ (Fnext_frame (frame, Qnil), frame);
+
+  /* Do we have more than one visible frame on this X display?  */
+  {
+    Lisp_Object tail;
+
+    for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr)
+      {
+	FRAME_PTR tf = XFRAME (XCONS (tail)->car);
+
+	if (tf != f && tf->kboard == f->kboard && !FRAME_MINIBUF_ONLY_P (tf)
+	    && (FRAME_VISIBLE_P (tf) || FRAME_ICONIFIED_P (tf)))
+	  break;
+      }
+
+    multiple_frames = CONSP (tail);
+  }
+
   obuf = current_buffer;
   Fset_buffer (XWINDOW (f->selected_window)->buffer);
   fmt = (FRAME_ICONIFIED_P (f) ? Vicon_title_format : Vframe_title_format);
@@ -4001,8 +4017,10 @@
   highlight_nonselected_windows = 1;
 
   DEFVAR_BOOL ("multiple-frames", &multiple_frames,
-    "Non-nil means more than one frame is in use, not counting minibuffer frames.\n\
-Not guaranteed to be accurate except while parsing frame-title-format.");
+    "Non-nil if more than one frame is visible on this display.\n\
+Minibuffer-only frames don't count, but iconified frames do.\n\
+This variable is not guaranteed to be accurate except while parsing\n\
+frame-title-format.");
 
   DEFVAR_LISP ("frame-title-format", &Vframe_title_format,
     "Template for displaying the titlebar of visible frames.\n\