#include "dispextern.h"
#include "blockinput.h"
#include "intervals.h"
+#include "termhooks.h" /* For FRAME_TERMINAL. */
#ifdef HAVE_X_WINDOWS
#include "xterm.h"
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)
{
|| (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)