#include <config.h>
#include "lisp.h"
#include "buffer.h"
+#include "keyboard.h"
#include "frame.h"
#include "window.h"
#include "commands.h"
#include "indent.h"
#include "termchar.h"
#include "disptab.h"
-#include "keyboard.h"
#include "dispextern.h"
#include "blockinput.h"
#include "intervals.h"
&& *y < top_y + CURRENT_HEADER_LINE_HEIGHT (w))
/* On the top line. */
return 4;
- else if (*x < left_x || *x >= right_x)
+ /* Need to say "*x > right_x" rather than >=, since on character
+ terminals, the vertical line's x coordinate is right_x. */
+ else if (*x < left_x || *x > right_x)
{
/* Other lines than the mode line don't include flags areas and
scroll bars on the left. */
*y -= top_y;
return *x < left_x ? 5 : 6;
}
+ /* Here, too, "*x > right_x" is because of character terminals. */
else if (!w->pseudo_window_p
&& !WINDOW_RIGHTMOST_P (w)
- && *x >= right_x - CANON_X_UNIT (f))
+ && *x > right_x - CANON_X_UNIT (f))
/* On the border on the right side of the window? Assume that
this area begins at RIGHT_X minus a canonical char width. */
return 3;
case GET_LARGEST_WINDOW:
{
- struct window *b;
-
/* Ignore dedicated windows and minibuffers. */
- if (MINI_WINDOW_P (w)
- || !NILP (w->dedicated)
- || NILP (best_window))
+ if (MINI_WINDOW_P (w) || !NILP (w->dedicated))
break;
- b = XWINDOW (best_window);
- if (NILP (best_window)
- || (XFASTINT (w->height) * XFASTINT (w->width)
- > (XFASTINT (b->height) * XFASTINT (b->width))))
+ if (NILP (best_window))
best_window = window;
+ else
+ {
+ struct window *b = XWINDOW (best_window);
+ if (XFASTINT (w->height) * XFASTINT (w->width)
+ > XFASTINT (b->height) * XFASTINT (b->width))
+ best_window = window;
+ }
}
break;
&& NILP (XBUFFER (w->buffer)->name))
abort ();
break;
+
+ case WINDOW_LOOP_UNUSED:
+ break;
}
}
Lisp_Object last_child;
int delta = old_height - height;
int last_top;
+
+ last_child = Qnil;
/* Find the last child. We are taking space from lowest windows
first, so we iterate over children from the last child
struct frame *f;
int freeze_p;
{
- foreach_window (f, freeze_window_start, (void *) freeze_p);
+ foreach_window (f, freeze_window_start, (void *) (freeze_p ? f : 0));
}
\f