changeset 85010:a3defcbdb064

(candidate_window_p): Only consider as visible frames that are on the same terminal.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 02 Oct 2007 20:43:54 +0000
parents 1889b9f9238e
children 1d35aa875508
files src/window.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Tue Oct 02 20:42:43 2007 +0000
+++ b/src/window.c	Tue Oct 02 20:43:54 2007 +0000
@@ -36,6 +36,7 @@
 #include "dispextern.h"
 #include "blockinput.h"
 #include "intervals.h"
+#include "termhooks.h"		/* For FRAME_TERMINAL.  */
 
 #ifdef HAVE_X_WINDOWS
 #include "xterm.h"
@@ -1794,7 +1795,10 @@
   else if (EQ (all_frames, Qvisible))
     {
       FRAME_SAMPLE_VISIBILITY (f);
-      candidate_p = FRAME_VISIBLE_P (f);
+      candidate_p = FRAME_VISIBLE_P (f)
+	&& (FRAME_TERMINAL (XFRAME (w->frame))
+	    == FRAME_TERMINAL (XFRAME (selected_frame)));
+
     }
   else if (INTEGERP (all_frames) && XINT (all_frames) == 0)
     {
@@ -1810,7 +1814,9 @@
 		     || (FRAME_X_P (f) && f->output_data.x->asked_for_visible
 			 && !f->output_data.x->has_been_visible)
 #endif
-		     );
+		     )
+	&& (FRAME_TERMINAL (XFRAME (w->frame))
+	    == FRAME_TERMINAL (XFRAME (selected_frame)));
     }
   else if (WINDOWP (all_frames))
     candidate_p = (EQ (FRAME_MINIBUF_WINDOW (f), all_frames)