]> code.delx.au - gnu-emacs/commitdiff
(next_frame): Don't check frame-focus redirection in
authorGerd Moellmann <gerd@gnu.org>
Fri, 30 Jun 2000 19:21:04 +0000 (19:21 +0000)
committerGerd Moellmann <gerd@gnu.org>
Fri, 30 Jun 2000 19:21:04 +0000 (19:21 +0000)
case MINIBUF is a window.  Doing so excludes frames using MINIBUF
unless their focus is redirected, which contradicts the
specification of next-frame, and leads to infinite loops in
certain situations when cycling through windows with next-window.

src/ChangeLog
src/frame.c

index 9d44e3092b5b02add72414d3ccde4ba6862652d6..0a254301fa61ef61993056dadc9a4c71beb95fe2 100644 (file)
@@ -1,3 +1,11 @@
+2000-06-30  Gerd Moellmann  <gerd@gnu.org>
+
+       * frame.c (next_frame): Don't check frame-focus redirection in
+       case MINIBUF is a window.  Doing so excludes frames using MINIBUF
+       unless their focus is redirected, which contradicts the
+       specification of next-frame, and leads to infinite loops in
+       certain situations when cycling through windows with next-window.
+
 2000-06-30  Kenichi Handa  <handa@etl.go.jp>
 
        * coding.c (code_convert_region): Even if the length of text is
index 0a8ac6afb3b2307115918c996bce629fab104861..2217b630374d839cdcf6e2343c6f9d4835f48d67 100644 (file)
@@ -934,7 +934,7 @@ next_frame (frame, minibuf)
                if (FRAME_VISIBLE_P (XFRAME (f)))
                  return f;
              }
-           else if (XFASTINT (minibuf) == 0)
+           else if (INTEGERP (minibuf) && XINT (minibuf) == 0)
              {
                FRAME_SAMPLE_VISIBILITY (XFRAME (f));
                if (FRAME_VISIBLE_P (XFRAME (f))
@@ -943,6 +943,10 @@ next_frame (frame, minibuf)
              }
            else if (WINDOWP (minibuf))
              {
+#if 0 /* I don't think the test for frame focus redirection is
+         correct.  This excludes frames "using the current minibuffer"
+         when their focus isn't redirected, which contradicts the doc
+         string of next-frame.  --gerd, 2000-06-30 */
                if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf)
                    /* Check that F either is, or has forwarded its focus to,
                       MINIBUF's frame.  */
@@ -950,6 +954,11 @@ next_frame (frame, minibuf)
                        || EQ (WINDOW_FRAME (XWINDOW (minibuf)),
                               FRAME_FOCUS_FRAME (XFRAME (f)))))
                  return f;
+#else /* not 0 */
+               if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf)
+                   || EQ (WINDOW_FRAME (XWINDOW (minibuf)), f))
+                 return f;
+#endif /* not 0 */
              }
            else
              return f;