]> git.eshelyaron.com Git - emacs.git/commitdiff
(candidate_window_p): Only consider as visible frames that
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 2 Oct 2007 20:43:54 +0000 (20:43 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 2 Oct 2007 20:43:54 +0000 (20:43 +0000)
are on the same terminal.

src/window.c

index 0bec39485180cffb5e76ccd1c074e6c4aa413db1..ca4c41f5e79235a85cbc074288af12f0608f0a21 100644 (file)
@@ -36,6 +36,7 @@ Boston, MA 02110-1301, USA.  */
 #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 @@ candidate_window_p (window, owindow, minibuf, all_frames)
   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 @@ candidate_window_p (window, owindow, minibuf, all_frames)
                     || (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)