/* Return the next frame in the frame list after FRAME.
If MINIBUF is nil, exclude minibuffer-only frames.
- If MINIBUF is a window, include only frames using that window for
- their minibuffer.
+ If MINIBUF is a window, include only its own frame
+ and any frame now using that window as the minibuffer.
If MINIBUF is `visible', include all visible frames.
+ If MINIBUF is 0, include all visible and iconified frames.
Otherwise, include all frames. */
Lisp_Object
if (FRAME_VISIBLE_P (XFRAME (f)))
return f;
}
+ else if (XFASTINT (minibuf) == 0)
+ {
+ FRAME_SAMPLE_VISIBILITY (XFRAME (f));
+ if (FRAME_VISIBLE_P (XFRAME (f))
+ || FRAME_ICONIFIED_P (XFRAME (f)))
+ return f;
+ }
else if (WINDOWP (minibuf))
{
- if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf))
+ if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf)
+ /* Check that F either is, or has forwarded its focus to,
+ MINIBUF's frame. */
+ && (EQ (WINDOW_FRAME (XWINDOW (minibuf)), f)
+ || EQ (WINDOW_FRAME (XWINDOW (minibuf)),
+ FRAME_FOCUS_FRAME (XFRAME (f)))))
return f;
}
else
/* Return the previous frame in the frame list before FRAME.
If MINIBUF is nil, exclude minibuffer-only frames.
- If MINIBUF is a window, include only frames using that window for
- their minibuffer.
+ If MINIBUF is a window, include only its own frame
+ and any frame now using that window as the minibuffer.
If MINIBUF is `visible', include all visible frames.
+ If MINIBUF is 0, include all visible and iconified frames.
Otherwise, include all frames. */
Lisp_Object
}
else if (XTYPE (minibuf) == Lisp_Window)
{
- if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf))
+ if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf)
+ /* Check that F either is, or has forwarded its focus to,
+ MINIBUF's frame. */
+ && (EQ (WINDOW_FRAME (XWINDOW (minibuf)), f)
+ || EQ (WINDOW_FRAME (XWINDOW (minibuf)),
+ FRAME_FOCUS_FRAME (XFRAME (f)))))
prev = f;
}
else if (EQ (minibuf, Qvisible))
if (FRAME_VISIBLE_P (XFRAME (f)))
prev = f;
}
+ else if (XFASTINT (f) == 0)
+ {
+ FRAME_SAMPLE_VISIBILITY (XFRAME (f));
+ if (FRAME_VISIBLE_P (XFRAME (f))
+ || FRAME_ICONIFIED_P (XFRAME (f)))
+ prev = f;
+ }
else
prev = f;
}
By default, skip minibuffer-only frames.\n\
If omitted, FRAME defaults to the selected frame.\n\
If optional argument MINIFRAME is nil, exclude minibuffer-only frames.\n\
-If MINIFRAME is a window, include only frames using that window for their\n\
-minibuffer.\n\
+If MINIBUF is a window, include only its own frame\n\
+and any frame now using that window as the minibuffer.\n\
If MINIFRAME is `visible', include all visible frames.\n\
+If MINIBUF is 0, include all visible and iconified frames.\n\
Otherwise, include all frames.")
(frame, miniframe)
Lisp_Object frame, miniframe;
By default, skip minibuffer-only frames.\n\
If omitted, FRAME defaults to the selected frame.\n\
If optional argument MINIFRAME is nil, exclude minibuffer-only frames.\n\
-If MINIFRAME is a window, include only frames using that window for their\n\
-minibuffer.\n\
+If MINIBUF is a window, include only its own frame\n\
+and any frame now using that window as the minibuffer.\n\
If MINIFRAME is `visible', include all visible frames.\n\
+If MINIBUF is 0, include all visible and iconified frames.\n\
Otherwise, include all frames.")
(frame, miniframe)
Lisp_Object frame, miniframe;