#include "msdos.h"
#endif
-static int displayed_window_lines (struct window *);
static int count_windows (struct window *);
static int get_leaf_windows (struct window *, struct window **, int);
-static void window_scroll (Lisp_Object, EMACS_INT, bool, int);
-static void window_scroll_pixel_based (Lisp_Object, int, bool, int);
-static void window_scroll_line_based (Lisp_Object, int, bool, int);
-static int add_window_to_list (struct window *, void *);
-static Lisp_Object next_window (Lisp_Object, Lisp_Object,
- Lisp_Object, int);
-static void decode_next_window_args (Lisp_Object *, Lisp_Object *,
- Lisp_Object *);
+static void window_scroll_pixel_based (Lisp_Object, int, bool, bool);
+static void window_scroll_line_based (Lisp_Object, int, bool, bool);
static void foreach_window (struct frame *,
- int (* fn) (struct window *, void *),
+ bool (* fn) (struct window *, void *),
void *);
-static int foreach_window_1 (struct window *,
- int (* fn) (struct window *, void *),
- void *);
-static Lisp_Object window_list_1 (Lisp_Object, Lisp_Object, Lisp_Object);
-static int window_resize_check (struct window *, bool);
+static bool foreach_window_1 (struct window *,
+ bool (* fn) (struct window *, void *),
+ void *);
+static bool window_resize_check (struct window *, bool);
static void window_resize_apply (struct window *, bool);
-static void window_resize_apply_total (struct window *, bool);
-static Lisp_Object select_window (Lisp_Object, Lisp_Object, int);
static void select_window_1 (Lisp_Object, bool);
static struct window *set_window_fringes (struct window *, Lisp_Object,
static struct window *set_window_margins (struct window *, Lisp_Object,
Lisp_Object);
static struct window *set_window_scroll_bars (struct window *, Lisp_Object,
- Lisp_Object, Lisp_Object, Lisp_Object);
+ Lisp_Object, Lisp_Object,
+ Lisp_Object);
static void apply_window_adjustment (struct window *);
/* This is the window in which the terminal's cursor should
w->horizontal = horflag;
}
-/* Nonzero if leaf window W doesn't reflect the actual state
+/* True if leaf window W doesn't reflect the actual state
of displayed buffer due to its text or overlays change. */
bool
b->window_count += arg;
eassert (b->window_count >= 0);
/* These should be recalculated by redisplay code. */
- w->window_end_valid = 0;
+ w->window_end_valid = false;
w->base_line_pos = 0;
}
}
int window_select_count;
-/* If select_window is called with inhibit_point_swap non-zero it will
+/* If select_window is called with inhibit_point_swap true it will
not store point of the old selected window's buffer back into that
window's pointm slot. This is needed by Fset_window_configuration to
avoid that the display routine is called with selected_window set to
Qnil causing a subsequent crash. */
static Lisp_Object
-select_window (Lisp_Object window, Lisp_Object norecord, int inhibit_point_swap)
+select_window (Lisp_Object window, Lisp_Object norecord,
+ bool inhibit_point_swap)
{
- register struct window *w;
+ struct window *w;
struct frame *sf;
CHECK_LIVE_WINDOW (window);
Also note that the main editor command loop sets the current buffer to
the buffer of the selected window before each command. */)
- (register Lisp_Object window, Lisp_Object norecord)
+ (Lisp_Object window, Lisp_Object norecord)
{
- return select_window (window, norecord, 0);
+ return select_window (window, norecord, false);
}
\f
DEFUN ("window-buffer", Fwindow_buffer, Swindow_buffer, 0, 1, 0,
- WINDOW_RIGHT_DIVIDER_WIDTH (w)
- (WINDOW_HAS_VERTICAL_SCROLL_BAR (w)
? WINDOW_SCROLL_BAR_AREA_WIDTH (w)
- : ((!FRAME_WINDOW_P (f)
- && !WINDOW_RIGHTMOST_P (w)
- && !WINDOW_RIGHT_DIVIDER_WIDTH (w))
- /* A vertical bar is either 1 or 0. */
- ? 1 : 0))
+ : (/* A vertical bar is either 1 or 0. */
+ !FRAME_WINDOW_P (f)
+ && !WINDOW_RIGHTMOST_P (w)
+ && !WINDOW_RIGHT_DIVIDER_WIDTH (w)))
- WINDOW_MARGINS_WIDTH (w)
- (FRAME_WINDOW_P (f)
? WINDOW_FRINGES_WIDTH (w)
(Lisp_Object window, Lisp_Object pixelwise)
{
return make_number (window_body_height (decode_live_window (window),
- NILP (pixelwise) ? 0 : 1));
+ !NILP (pixelwise)));
}
DEFUN ("window-body-width", Fwindow_body_width, Swindow_body_width, 0, 2, 0,
(Lisp_Object window, Lisp_Object pixelwise)
{
return make_number (window_body_width (decode_live_window (window),
- NILP (pixelwise) ? 0 : 1));
+ !NILP (pixelwise)));
}
DEFUN ("window-mode-line-height", Fwindow_mode_line_height,
/* Prevent redisplay shortcuts when changing the hscroll. */
if (w->hscroll != new_hscroll)
- XBUFFER (w->contents)->prevent_redisplay_optimizations_p = 1;
+ XBUFFER (w->contents)->prevent_redisplay_optimizations_p = true;
w->hscroll = new_hscroll;
- w->suspend_auto_hscroll = 1;
+ w->suspend_auto_hscroll = true;
return make_number (new_hscroll);
}
Check if window W contains coordinates *CW->x and *CW->y. If it
does, return W in *CW->window, as Lisp_Object, and return in
*CW->part the part of the window under coordinates *X,*Y. Return
- zero from this function to stop iterating over windows. */
+ false from this function to stop iterating over windows. */
struct check_window_data
{
enum window_part *part;
};
-static int
+static bool
check_window_containing (struct window *w, void *user_data)
{
struct check_window_data *cw = user_data;
- enum window_part found;
- int continue_p = 1;
-
- found = coordinates_in_window (w, cw->x, cw->y);
- if (found != ON_NOTHING)
+ enum window_part found = coordinates_in_window (w, cw->x, cw->y);
+ if (found == ON_NOTHING)
+ return true;
+ else
{
*cw->part = found;
XSETWINDOW (*cw->window, w);
- continue_p = 0;
+ return false;
}
-
- return continue_p;
}
set *PART to the id of that element.
If there is no window under X, Y return nil and leave *PART
- unmodified. TOOL_BAR_P non-zero means detect tool-bar windows.
+ unmodified. TOOL_BAR_P means detect tool-bar windows.
This function was previously implemented with a loop cycling over
windows with Fnext_window, and starting with the frame's selected
+ FRAME_INTERNAL_BORDER_WIDTH (f)),
(FRAME_PIXEL_Y_FROM_CANON_Y (f, y)
+ FRAME_INTERNAL_BORDER_WIDTH (f)),
- 0, 0);
+ 0, false);
}
DEFUN ("window-point", Fwindow_point, Swindow_point, 0, 1, 0,
if (it.current_y < it.last_visible_y)
move_it_past_eol (&it);
value = make_number (IT_CHARPOS (it));
- bidi_unshelve_cache (itdata, 0);
+ bidi_unshelve_cache (itdata, false);
if (old_buffer)
set_buffer_internal (old_buffer);
set_marker_restricted (w->start, pos, w->contents);
/* This is not right, but much easier than doing what is right. */
- w->start_at_line_beg = 0;
+ w->start_at_line_beg = false;
if (NILP (noforce))
- w->force_start = 1;
- w->update_mode_line = 1;
+ w->force_start = true;
+ w->update_mode_line = true;
/* Bug#15957. */
- w->window_end_valid = 0;
+ w->window_end_valid = false;
wset_redisplay (w);
return pos;
\(zero-based). */)
(Lisp_Object pos, Lisp_Object window, Lisp_Object partially)
{
- register struct window *w;
- register EMACS_INT posint;
- register struct buffer *buf;
+ struct window *w;
+ EMACS_INT posint;
+ struct buffer *buf;
struct text_pos top;
Lisp_Object in_window = Qnil;
- int rtop, rbot, rowh, vpos, fully_p = 1;
+ int rtop, rbot, rowh, vpos;
+ bool fully_p = true;
int x, y;
w = decode_live_window (window);
|| (posint >= CHARPOS (top) && posint <= BUF_ZV (buf)))
&& CHARPOS (top) >= BUF_BEGV (buf)
&& CHARPOS (top) <= BUF_ZV (buf)
- && pos_visible_p (w, posint, &x, &y, &rtop, &rbot, &rowh, &vpos)
- && (fully_p = !rtop && !rbot, (!NILP (partially) || fully_p)))
- in_window = Qt;
+ && pos_visible_p (w, posint, &x, &y, &rtop, &rbot, &rowh, &vpos))
+ {
+ fully_p = !rtop && !rbot;
+ if (!NILP (partially) || fully_p)
+ in_window = Qt;
+ }
if (!NILP (in_window) && !NILP (partially))
{
eassert (b == XMARKER (w->pointm)->buffer);
-#if 0
+#if false
if (w == XWINDOW (selected_window)
|| ! EQ (buf, XWINDOW (selected_window)->contents))
/* Do this except when the selected window's buffer
bset_last_selected_window (b, Qnil);
}
-/* Put NEW into the window structure in place of OLD. SETFLAG zero
+/* Put NEW into the window structure in place of OLD. SETFLAG false
means change window structure only. Otherwise store geometry and
other settings as well. */
static void
-replace_window (Lisp_Object old, Lisp_Object new, int setflag)
+replace_window (Lisp_Object old, Lisp_Object new, bool setflag)
{
- register Lisp_Object tem;
- register struct window *o = XWINDOW (old), *n = XWINDOW (new);
+ Lisp_Object tem;
+ struct window *o = XWINDOW (old), *n = XWINDOW (new);
/* If OLD is its frame's root window, then NEW is the new
root window for that frame. */
n->phys_cursor_type = NO_CURSOR;
n->phys_cursor_width = -1;
#endif
- n->must_be_updated_p = 0;
- n->pseudo_window_p = 0;
+ n->must_be_updated_p = false;
+ n->pseudo_window_p = false;
n->window_end_vpos = 0;
n->window_end_pos = 0;
- n->window_end_valid = 0;
+ n->window_end_valid = false;
}
tem = o->next;
}
/* WINDOW can be deleted now. */
- wset_combination (w, 0, Qnil);
+ wset_combination (w, false, Qnil);
}
}
}
pointer. This is a callback function for foreach_window, used in
the window_list function. */
-static int
+static bool
add_window_to_list (struct window *w, void *user_data)
{
Lisp_Object *list = user_data;
Lisp_Object window;
XSETWINDOW (window, w);
*list = Fcons (window, *list);
- return 1;
+ return true;
}
}
-/* Value is non-zero if WINDOW satisfies the constraints given by
+/* Value is true if WINDOW satisfies the constraints given by
OWINDOW, MINIBUF and ALL_FRAMES.
MINIBUF t means WINDOW may be minibuffer windows.
{
struct window *w = XWINDOW (window);
struct frame *f = XFRAME (w->frame);
- bool candidate_p = 1;
+ bool candidate_p = true;
if (!BUFFERP (w->contents))
- candidate_p = 0;
+ candidate_p = false;
else if (MINI_WINDOW_P (w)
&& (EQ (minibuf, Qlambda)
|| (WINDOWP (minibuf) && !EQ (minibuf, window))))
{
/* If MINIBUF is `lambda' don't consider any mini-windows.
If it is a window, consider only that one. */
- candidate_p = 0;
+ candidate_p = false;
}
else if (EQ (all_frames, Qt))
- candidate_p = 1;
+ candidate_p = true;
else if (NILP (all_frames))
{
eassert (WINDOWP (owindow));
/* Return the next or previous window of WINDOW in cyclic ordering
- of windows. NEXT_P non-zero means return the next window. See the
+ of windows. NEXT_P means return the next window. See the
documentation string of next-window for the meaning of MINIBUF and
ALL_FRAMES. */
static Lisp_Object
-next_window (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames, int next_p)
+next_window (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames,
+ bool next_p)
{
decode_next_window_args (&window, &minibuf, &all_frames);
`previous-window' traverses the same cycle, in the reverse order. */)
(Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames)
{
- return next_window (window, minibuf, all_frames, 1);
+ return next_window (window, minibuf, all_frames, true);
}
reverse order. */)
(Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames)
{
- return next_window (window, minibuf, all_frames, 0);
+ return next_window (window, minibuf, all_frames, false);
}
Qnil, look at just the selected frame;
Qvisible, look at visible frames;
a frame, just look at windows on that frame.
- If MINI is non-zero, perform the operation on minibuffer windows too. */
+ If MINI, perform the operation on minibuffer windows too. */
enum window_loop
{
};
static Lisp_Object
-window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frames)
+window_loop (enum window_loop type, Lisp_Object obj, bool mini,
+ Lisp_Object frames)
{
Lisp_Object window, windows, best_window, frame_arg;
- int frame_best_window_flag = 0;
+ bool frame_best_window_flag = false;
struct frame *f;
struct gcpro gcpro1;
if (EQ (w->contents, obj)
/* Don't find any minibuffer window except the one that
is currently in use. */
- && (MINI_WINDOW_P (w) ? EQ (window, minibuf_window) : 1))
+ && (!MINI_WINDOW_P (w) || EQ (window, minibuf_window)))
{
if (EQ (window, selected_window))
/* Preferably return the selected window. */
choose another one if we have one already). */
{
best_window = window;
- frame_best_window_flag = 1;
+ frame_best_window_flag = true;
}
else if (NILP (best_window))
best_window = window;
/* Make WINDOW show the buffer returned by
other_buffer_safely, don't run any hooks. */
set_window_buffer
- (window, other_buffer_safely (w->contents), 0, 0);
+ (window, other_buffer_safely (w->contents), false, false);
/* If WINDOW is the selected window, make its buffer
current. But do so only if the window shows the
current buffer (Bug#6454). */
case REDISPLAY_BUFFER_WINDOWS:
if (EQ (w->contents, obj))
{
- mark_window_display_accurate (window, 0);
- w->update_mode_line = 1;
- XBUFFER (obj)->prevent_redisplay_optimizations_p = 1;
+ mark_window_display_accurate (window, false);
+ w->update_mode_line = true;
+ XBUFFER (obj)->prevent_redisplay_optimizations_p = true;
update_mode_lines = 27;
best_window = window;
}
void
check_all_windows (void)
{
- window_loop (CHECK_ALL_WINDOWS, Qnil, 1, Qt);
+ window_loop (CHECK_ALL_WINDOWS, Qnil, true, Qt);
}
DEFUN ("get-buffer-window", Fget_buffer_window, Sget_buffer_window, 0, 2, 0,
buffer = Fget_buffer (buffer_or_name);
if (BUFFERP (buffer))
- return window_loop (GET_BUFFER_WINDOW, buffer, 1, all_frames);
+ return window_loop (GET_BUFFER_WINDOW, buffer, true, all_frames);
else
return Qnil;
}
struct frame *f;
Lisp_Object sibling, pwindow, swindow IF_LINT (= Qnil), delta;
ptrdiff_t startpos IF_LINT (= 0), startbyte IF_LINT (= 0);
- int top IF_LINT (= 0), new_top, resize_failed;
+ int top IF_LINT (= 0), new_top;
w = decode_valid_window (window);
XSETWINDOW (window, w);
parents and comparing each one with WINDOW. If it isn't we
need a new selected window for this frame. */
swindow = FRAME_SELECTED_WINDOW (f);
- while (1)
+ while (true)
{
pwindow = swindow;
while (!NILP (pwindow) && !EQ (window, pwindow))
/* We are going to free the glyph matrices of WINDOW, and with
that we might lose any information about glyph rows that have
some of their glyphs highlighted in mouse face. (These rows
- are marked with a non-zero mouse_face_p flag.) If WINDOW
+ are marked with a mouse_face_p flag.) If WINDOW
indeed has some glyphs highlighted in mouse face, signal to
frame's up-to-date hook that mouse highlight was overwritten,
so that it will arrange for redisplaying the highlight. */
fset_redisplay (f);
Vwindow_list = Qnil;
- FRAME_WINDOW_SIZES_CHANGED (f) = 1;
- resize_failed = 0;
+ FRAME_WINDOW_SIZES_CHANGED (f) = true;
+ bool resize_failed = false;
if (!WINDOW_LEAF_P (w))
{
w->pixel_top = r->pixel_top;
w->top_line = r->top_line;
resize_root_window (window, delta, Qnil, Qnil, Qt);
- if (window_resize_check (w, 0))
+ if (window_resize_check (w, false))
{
- window_resize_apply (w, 0);
+ window_resize_apply (w, false);
window_pixel_to_total (w->frame, Qnil);
}
else
{
resize_root_window (window, delta, Qnil, Qt, Qt);
- if (window_resize_check (w, 0))
+ if (window_resize_check (w, false))
{
- window_resize_apply (w, 0);
+ window_resize_apply (w, false);
window_pixel_to_total (w->frame, Qnil);
}
else
- resize_failed = 1;
+ resize_failed = true;
}
/* Resize child windows horizontally. */
w->pixel_left = r->pixel_left;
XSETINT (delta, r->pixel_width - w->pixel_width);
resize_root_window (window, delta, Qt, Qnil, Qt);
- if (window_resize_check (w, 1))
+ if (window_resize_check (w, true))
{
- window_resize_apply (w, 1);
+ window_resize_apply (w, true);
window_pixel_to_total (w->frame, Qt);
}
else
{
resize_root_window (window, delta, Qt, Qt, Qt);
- if (window_resize_check (w, 1))
+ if (window_resize_check (w, true))
{
- window_resize_apply (w, 1);
+ window_resize_apply (w, true);
window_pixel_to_total (w->frame, Qt);
}
else
- resize_failed = 1;
+ resize_failed = true;
}
}
if (WINDOWP (r->contents))
{
delete_all_child_windows (r->contents);
- wset_combination (r, 0, Qnil);
+ wset_combination (r, false, Qnil);
}
- replace_window (root, window, 1);
+ replace_window (root, window, true);
/* This must become SWINDOW anyway ....... */
if (BUFFERP (w->contents) && !resize_failed)
pos = *vmotion (startpos, startbyte, -top, w);
set_marker_both (w->start, w->contents, pos.bufpos, pos.bytepos);
- w->window_end_valid = 0;
+ w->window_end_valid = false;
w->start_at_line_beg = (pos.bytepos == BEGV_BYTE
|| FETCH_BYTE (pos.bytepos - 1) == '\n');
/* We need to do this, so that the window-scroll-functions
get called. */
- w->optional_new_start = 1;
+ w->optional_new_start = true;
set_buffer_internal (obuf);
}
considers frames on the current keyboard. So loop manually over
frames, and handle each one. */
FOR_EACH_FRAME (tail, frame)
- window_loop (REPLACE_BUFFER_IN_WINDOWS_SAFELY, buffer, 1, frame);
+ window_loop (REPLACE_BUFFER_IN_WINDOWS_SAFELY, buffer, true, frame);
}
}
\f
return Qnil;
}
-/* Make WINDOW display BUFFER. RUN_HOOKS_P non-zero means it's allowed
+/* Make WINDOW display BUFFER. RUN_HOOKS_P means it's allowed
to run hooks. See make_frame for a case where it's not allowed.
- KEEP_MARGINS_P non-zero means that the current margins, fringes, and
+ KEEP_MARGINS_P means that the current margins, fringes, and
scroll-bar settings of the window are not reset from the buffer's
local settings. */
doc-view-mode since it resets the image's position whenever we
resize the frame. */
w->hscroll = w->min_hscroll = w->hscroll_whole = 0;
- w->suspend_auto_hscroll = 0;
+ w->suspend_auto_hscroll = false;
w->vscroll = 0;
set_marker_both (w->pointm, buffer, BUF_PT (b), BUF_PT_BYTE (b));
set_marker_both (w->old_pointm, buffer, BUF_PT (b), BUF_PT_BYTE (b));
set_marker_restricted (w->start,
make_number (b->last_window_start),
buffer);
- w->start_at_line_beg = 0;
- w->force_start = 0;
+ w->start_at_line_beg = false;
+ w->force_start = false;
}
/* Maybe we could move this into the `if' but it's not obviously safe and
I doubt it's worth the trouble. */
unshow_buffer (w);
}
- set_window_buffer (window, buffer, 1, !NILP (keep_margins));
+ set_window_buffer (window, buffer, true, !NILP (keep_margins));
return Qnil;
}
if (WINDOWP (object))
{
struct window *w = XWINDOW (object);
- mark_window_display_accurate (object, 0);
- w->update_mode_line = 1;
+ mark_window_display_accurate (object, false);
+ w->update_mode_line = true;
if (BUFFERP (w->contents))
- XBUFFER (w->contents)->prevent_redisplay_optimizations_p = 1;
+ XBUFFER (w->contents)->prevent_redisplay_optimizations_p = true;
update_mode_lines = 29;
return Qt;
}
{
/* If buffer is live and shown in at least one window, find
all windows showing this buffer and force update of them. */
- object = window_loop (REDISPLAY_BUFFER_WINDOWS, object, 0, Qvisible);
+ object = window_loop (REDISPLAY_BUFFER_WINDOWS, object, false, Qvisible);
return NILP (object) ? Qnil : Qt;
}
Vminibuf_scroll_window = window;
w = XWINDOW (window);
w->hscroll = w->min_hscroll = w->hscroll_whole = 0;
- w->suspend_auto_hscroll = 0;
+ w->suspend_auto_hscroll = false;
set_marker_restricted_both (w->start, buf, BEG, BEG);
set_marker_restricted_both (w->pointm, buf, BEG, BEG);
set_marker_restricted_both (w->old_pointm, buf, BEG, BEG);
}
/* Make new window, have it replace WINDOW in window-tree, and make
- WINDOW its only vertical child (HORFLAG 1 means make WINDOW its only
+ WINDOW its only vertical child (HORFLAG means make WINDOW its only
horizontal child). */
static void
make_parent_window (Lisp_Object window, bool horflag)
p->sequence_number = ++sequence_number;
- replace_window (window, parent, 1);
+ replace_window (window, parent, true);
wset_next (o, Qnil);
wset_prev (o, Qnil);
return size;
}
-/* Return 1 if setting w->pixel_height (w->pixel_width if HORFLAG is
- non-zero) to w->new_pixel would result in correct heights (widths)
+/* Return true if setting w->pixel_height (w->pixel_width if HORFLAG)
+ to w->new_pixel would result in correct heights (widths)
for window W and recursively all child windows of W.
Note: This function does not check any of `window-fixed-size-p',
`window-min-height' or `window-min-width'. It does check that window
sizes do not drop below one line (two columns). */
-static int
+static bool
window_resize_check (struct window *w, bool horflag)
{
struct frame *f = XFRAME (w->frame);
{
if (XINT (c->new_pixel) != XINT (w->new_pixel)
|| !window_resize_check (c, horflag))
- return 0;
+ return false;
c = NILP (c->next) ? 0 : XWINDOW (c->next);
}
- return 1;
+ return true;
}
else
/* The sum of the heights of the child windows of W must equal
while (c)
{
if (!window_resize_check (c, horflag))
- return 0;
+ return false;
remaining_pixels -= XINT (c->new_pixel);
if (remaining_pixels < 0)
- return 0;
+ return false;
c = NILP (c->next) ? 0 : XWINDOW (c->next);
}
while (c)
{
if (!window_resize_check (c, horflag))
- return 0;
+ return false;
remaining_pixels -= XINT (c->new_pixel);
if (remaining_pixels < 0)
- return 0;
+ return false;
c = NILP (c->next) ? 0 : XWINDOW (c->next);
}
{
if (XINT (c->new_pixel) != XINT (w->new_pixel)
|| !window_resize_check (c, horflag))
- return 0;
+ return false;
c = NILP (c->next) ? 0 : XWINDOW (c->next);
}
- return 1;
+ return true;
}
}
else
}
-/* Set w->pixel_height (w->pixel_width if HORFLAG is non-zero) to
+/* Set w->pixel_height (w->pixel_width if HORFLAG) to
w->new_pixel for window W and recursively all child windows of W.
Also calculate and assign the new vertical (horizontal) pixel start
positions of each of these windows.
}
else
/* Bug#15957. */
- w->window_end_valid = 0;
+ w->window_end_valid = false;
}
-/* Set w->total_lines (w->total_cols if HORFLAG is non-zero) to
+/* Set w->total_lines (w->total_cols if HORFLAG) to
w->new_total for window W and recursively all child windows of W.
Also calculate and assign the new vertical (horizontal) start
positions of each of these windows. */
window_resize_apply (r, horflag);
fset_redisplay (f);
- FRAME_WINDOW_SIZES_CHANGED (f) = 1;
+ FRAME_WINDOW_SIZES_CHANGED (f) = true;
adjust_frame_glyphs (f);
unblock_input ();
/* Resize frame F's windows when number of lines of F is set to SIZE.
- HORFLAG 1 means resize windows when number of columns of F is set to
- SIZE. PIXELWISE 1 means to interpret SIZE as pixels. */
+ HORFLAG means resize windows when number of columns of F is set to
+ SIZE. PIXELWISE means to interpret SIZE as pixels. */
void
resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise)
{
}
else
{
- new_size = max (horflag
- ? size
- : (size
- - ((FRAME_HAS_MINIBUF_P (f)
- && !FRAME_MINIBUF_ONLY_P (f))
- ? 1 : 0)),
+ new_size = max (size - (!horflag
+ && FRAME_HAS_MINIBUF_P (f)
+ && !FRAME_MINIBUF_ONLY_P (f)),
1);
new_pixel_size = new_size * unit;
}
{
window_resize_apply (r, horflag);
window_pixel_to_total (r->frame, horflag ? Qt : Qnil);
-#if 0 /* Let's try without safe sizes and/or killing other windows. */
+#if false /* Let's try without safe sizes and/or killing other windows. */
}
else
{
XWINDOW (root)->pixel_height = new_pixel_size;
}
}
-#endif /* 0 */
+#endif /* false */
}
}
}
provided OLD is a leaf window, or to the frame's selected window.
NEW (*n) is the new window created with some parameters taken from
REFERENCE (*r). */
- register Lisp_Object new, frame, reference;
- register struct window *o, *p, *n, *r, *c;
+ Lisp_Object new, frame, reference;
+ struct window *o, *p, *n, *r, *c;
struct frame *f;
bool horflag
- /* HORFLAG is 1 when we split side-by-side, 0 otherwise. */
+ /* HORFLAG is true when we split side-by-side, false otherwise. */
= EQ (side, Qt) || EQ (side, Qleft) || EQ (side, Qright);
- int combination_limit = 0, sum = 0;
- int total_size;
CHECK_WINDOW (old);
o = XWINDOW (old);
f = XFRAME (frame);
CHECK_NUMBER (pixel_size);
- total_size
+ int total_size
= XINT (pixel_size) / (horflag
? FRAME_COLUMN_WIDTH (f)
: FRAME_LINE_HEIGHT (f));
- /* Set combination_limit to 1 if we have to make a new parent window.
+ /* Set combination_limit if we have to make a new parent window.
We do that if either `window-combination-limit' is t, or OLD has no
parent, or OLD is ortho-combined. */
- combination_limit =
- EQ (Vwindow_combination_limit, Qt)
- || NILP (o->parent)
- || (horflag
- ? WINDOW_VERTICAL_COMBINATION_P (XWINDOW (o->parent))
- : WINDOW_HORIZONTAL_COMBINATION_P (XWINDOW (o->parent)));
+ bool combination_limit
+ = (EQ (Vwindow_combination_limit, Qt)
+ || NILP (o->parent)
+ || (horflag
+ ? WINDOW_VERTICAL_COMBINATION_P (XWINDOW (o->parent))
+ : WINDOW_HORIZONTAL_COMBINATION_P (XWINDOW (o->parent))));
/* We need a live reference window to initialize some parameters. */
if (WINDOW_LIVE_P (old))
p = XWINDOW (o->parent);
fset_redisplay (f);
- FRAME_WINDOW_SIZES_CHANGED (f) = 1;
+ FRAME_WINDOW_SIZES_CHANGED (f) = true;
new = make_window ();
n = XWINDOW (new);
wset_frame (n, frame);
wset_next (o, new);
}
- n->window_end_valid = 0;
+ n->window_end_valid = false;
n->last_cursor_vpos = 0;
/* Get special geometry settings from reference window. */
/* Iso-coordinates and sizes are assigned by window_resize_apply,
get them ready here. */
wset_new_pixel (n, pixel_size);
+ int sum = 0;
c = XWINDOW (p->contents);
while (c)
{
adjust_frame_glyphs (f);
/* Set buffer of NEW to buffer of reference window. Don't run
any hooks. */
- set_window_buffer (new, r->contents, 0, 1);
+ set_window_buffer (new, r->contents, false, true);
unblock_input ();
/* Maybe we should run the scroll functions in Elisp (which already
doc: /* Remove WINDOW from its frame.
WINDOW defaults to the selected window. Return nil.
Signal an error when WINDOW is the only window on its frame. */)
- (register Lisp_Object window)
+ (Lisp_Object window)
{
- register Lisp_Object parent, sibling, frame, root;
+ Lisp_Object parent, sibling, frame, root;
struct window *w, *p, *s, *r;
struct frame *f;
- bool horflag, before_sibling = 0;
+ bool horflag, before_sibling = false;
w = decode_any_window (window);
XSETWINDOW (window, w);
if (NILP (w->prev))
/* Get SIBLING below (on the right of) WINDOW. */
{
- /* before_sibling 1 means WINDOW is the first child of its
+ /* before_sibling means WINDOW is the first child of its
parent and thus before the sibling. */
- before_sibling = 1;
+ before_sibling = true;
sibling = w->next;
s = XWINDOW (sibling);
wset_prev (s, Qnil);
fset_redisplay (f);
Vwindow_list = Qnil;
- FRAME_WINDOW_SIZES_CHANGED (f) = 1;
+ FRAME_WINDOW_SIZES_CHANGED (f) = true;
wset_next (w, Qnil); /* Don't delete w->next too. */
free_window_matrices (w);
if (WINDOWP (w->contents))
{
delete_all_child_windows (w->contents);
- wset_combination (w, 0, Qnil);
+ wset_combination (w, false, Qnil);
}
else
{
PARENT. */
{
/* Put SIBLING into PARENT's place. */
- replace_window (parent, sibling, 0);
+ replace_window (parent, sibling, false);
/* Have SIBLING inherit the following three slot values from
PARENT (the combination_limit slot is not inherited). */
wset_normal_cols (s, p->normal_cols);
wset_normal_lines (s, p->normal_lines);
/* Mark PARENT as deleted. */
- wset_combination (p, 0, Qnil);
+ wset_combination (p, false, Qnil);
/* Try to merge SIBLING into its new parent. */
recombine_windows (sibling);
}
r = XWINDOW (root);
height = call3 (Qwindow_resize_root_window_vertically,
root, make_number (- delta), pixelwise ? Qt : Qnil);
- if (INTEGERP (height) && window_resize_check (r, 0))
+ if (INTEGERP (height) && window_resize_check (r, false))
{
block_input ();
- window_resize_apply (r, 0);
+ window_resize_apply (r, false);
if (pixelwise)
{
delta = call3 (Qwindow_resize_root_window_vertically,
root, make_number (height - unit),
pixelwise ? Qt : Qnil);
- if (INTEGERP (delta) && window_resize_check (r, 0))
+ if (INTEGERP (delta) && window_resize_check (r, false))
{
block_input ();
- window_resize_apply (r, 0);
+ window_resize_apply (r, false);
/* Shrink the mini-window. */
w->top_line = r->top_line + r->total_lines;
r = XWINDOW (FRAME_ROOT_WINDOW (f));
height = r->pixel_height + w->pixel_height;
- if (window_resize_check (r, 0)
+ if (window_resize_check (r, false)
&& XINT (w->new_pixel) > 0
&& height == XINT (r->new_pixel) + XINT (w->new_pixel))
{
block_input ();
- window_resize_apply (r, 0);
+ window_resize_apply (r, false);
w->pixel_height = XFASTINT (w->new_pixel);
w->total_lines = w->pixel_height / FRAME_LINE_HEIGHT (f);
w->top_line = r->top_line + r->total_lines;
fset_redisplay (f);
- FRAME_WINDOW_SIZES_CHANGED (f) = 1;
+ FRAME_WINDOW_SIZES_CHANGED (f) = true;
adjust_frame_glyphs (f);
unblock_input ();
return Qt;
if (WINDOWP (w->contents))
mark_window_cursors_off (XWINDOW (w->contents));
else
- w->phys_cursor_on_p = 0;
+ w->phys_cursor_on_p = false;
w = NILP (w->next) ? 0 : XWINDOW (w->next);
}
Window Scrolling
***********************************************************************/
-/* Scroll contents of window WINDOW up. If WHOLE is non-zero, scroll
+/* Scroll contents of window WINDOW up. If WHOLE, scroll
N screen-fulls, which is defined as the height of the window minus
next_screen_context_lines. If WHOLE is zero, scroll up N lines
- instead. Negative values of N mean scroll down. NOERROR non-zero
+ instead. Negative values of N mean scroll down. NOERROR
means don't signal an error if we try to move over BEGV or ZV,
respectively. */
static void
-window_scroll (Lisp_Object window, EMACS_INT n, bool whole, int noerror)
+window_scroll (Lisp_Object window, EMACS_INT n, bool whole, bool noerror)
{
ptrdiff_t count = SPECPDL_INDEX ();
- immediate_quit = 1;
+ immediate_quit = true;
n = clip_to_bounds (INT_MIN, n, INT_MAX);
wset_redisplay (XWINDOW (window));
unbind_to (count, Qnil);
/* Bug#15957. */
- XWINDOW (window)->window_end_valid = 0;
- immediate_quit = 0;
+ XWINDOW (window)->window_end_valid = false;
+ immediate_quit = false;
}
descriptions. */
static void
-window_scroll_pixel_based (Lisp_Object window, int n, bool whole, int noerror)
+window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror)
{
struct it it;
struct window *w = XWINDOW (window);
struct text_pos start;
int this_scroll_margin;
/* True if we fiddled the window vscroll field without really scrolling. */
- int vscrolled = 0;
+ bool vscrolled = false;
int x, y, rtop, rbot, rowh, vpos;
void *itdata = NULL;
int window_total_lines;
}
start = it.current.pos;
- bidi_unshelve_cache (itdata, 0);
+ bidi_unshelve_cache (itdata, false);
}
else if (auto_window_vscroll_p)
{
spos = min (XINT (Fline_end_position (Qnil)) + 1, ZV);
set_marker_restricted (w->start, make_number (spos),
w->contents);
- w->start_at_line_beg = 1;
- w->update_mode_line = 1;
+ w->start_at_line_beg = true;
+ w->update_mode_line = true;
/* Set force_start so that redisplay_window will run the
window-scroll-functions. */
- w->force_start = 1;
+ w->force_start = true;
return;
}
}
}
else
{
- bidi_unshelve_cache (itdata, 0);
+ bidi_unshelve_cache (itdata, false);
if (noerror)
return;
else if (n < 0) /* could happen with empty buffers */
w->vscroll = 0;
else
{
- bidi_unshelve_cache (itdata, 0);
+ bidi_unshelve_cache (itdata, false);
if (noerror)
return;
else
/* If control gets here, then we vscrolled. */
- XBUFFER (w->contents)->prevent_redisplay_optimizations_p = 1;
+ XBUFFER (w->contents)->prevent_redisplay_optimizations_p = true;
/* Don't try to change the window start below. */
- vscrolled = 1;
+ vscrolled = true;
}
if (! vscrolled)
IT_BYTEPOS (it));
bytepos = marker_byte_position (w->start);
w->start_at_line_beg = (pos == BEGV || FETCH_BYTE (bytepos - 1) == '\n');
- w->update_mode_line = 1;
+ w->update_mode_line = true;
/* Set force_start so that redisplay_window will run the
window-scroll-functions. */
- w->force_start = 1;
+ w->force_start = true;
}
/* The rest of this function uses current_y in a nonstandard way,
This is necessary because we set it.current_y to 0, above. */
move_it_to (&it, -1,
window_scroll_pixel_based_preserve_x,
- window_scroll_pixel_based_preserve_y
- - (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0 ),
+ (window_scroll_pixel_based_preserve_y
+ - WINDOW_WANTS_HEADER_LINE_P (w)),
-1, MOVE_TO_Y | MOVE_TO_X);
SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it));
}
else if (n < 0)
{
ptrdiff_t charpos, bytepos;
- int partial_p;
+ bool partial_p;
/* Save our position, for the
window_scroll_pixel_based_preserve_y case. */
{
charpos = IT_CHARPOS (it);
bytepos = IT_BYTEPOS (it);
- bidi_unshelve_cache (it_data, 1);
+ bidi_unshelve_cache (it_data, true);
}
else
{
it = it2;
- bidi_unshelve_cache (it_data, 0);
+ bidi_unshelve_cache (it_data, false);
}
}
SET_PT_BOTH (charpos, bytepos);
}
}
- bidi_unshelve_cache (itdata, 0);
+ bidi_unshelve_cache (itdata, false);
if (adjust_old_pointm)
Fset_marker (w->old_pointm,
See the comment of window_scroll for parameter descriptions. */
static void
-window_scroll_line_based (Lisp_Object window, int n, bool whole, int noerror)
+window_scroll_line_based (Lisp_Object window, int n, bool whole, bool noerror)
{
- register struct window *w = XWINDOW (window);
+ struct window *w = XWINDOW (window);
/* Fvertical_motion enters redisplay, which can trigger
fontification, which in turn can modify buffer text (e.g., if the
fontification functions replace escape sequences with faces, as
|| NILP (Fget (KVAR (current_kboard, Vlast_command), Qscroll_command)))
{
struct position posit
- = *compute_motion (startpos, startbyte, 0, 0, 0,
+ = *compute_motion (startpos, startbyte, 0, 0, false,
PT, ht, 0, -1, w->hscroll, 0, w);
window_scroll_preserve_vpos = posit.vpos;
set_marker_restricted_both (w->start, w->contents, pos, pos_byte);
w->start_at_line_beg = !NILP (bolp);
- w->update_mode_line = 1;
+ w->update_mode_line = true;
/* Set force_start so that redisplay_window will run
the window-scroll-functions. */
- w->force_start = 1;
+ w->force_start = true;
if (!NILP (Vscroll_preserve_screen_position)
&& (whole || !EQ (Vscroll_preserve_screen_position, Qt)))
}
if (NILP (n))
- window_scroll (selected_window, direction, 1, 0);
+ window_scroll (selected_window, direction, true, false);
else if (EQ (n, Qminus))
- window_scroll (selected_window, -direction, 1, 0);
+ window_scroll (selected_window, -direction, true, false);
else
{
n = Fprefix_numeric_value (n);
- window_scroll (selected_window, XINT (n) * direction, 0, 0);
+ window_scroll (selected_window, XINT (n) * direction, false, false);
}
unbind_to (count, Qnil);
SET_PT_BOTH (marker_position (w->old_pointm), marker_byte_position (w->old_pointm));
if (NILP (arg))
- window_scroll (window, 1, 1, 1);
+ window_scroll (window, 1, true, true);
else if (EQ (arg, Qminus))
- window_scroll (window, -1, 1, 1);
+ window_scroll (window, -1, true, true);
else
{
if (CONSP (arg))
arg = XCAR (arg);
CHECK_NUMBER (arg);
- window_scroll (window, XINT (arg), 0, 1);
+ window_scroll (window, XINT (arg), false, true);
}
set_marker_both (w->pointm, Qnil, PT, PT_BYTE);
if (!NILP (set_minimum))
w->min_hscroll = w->hscroll;
- w->suspend_auto_hscroll = 1;
+ w->suspend_auto_hscroll = true;
return result;
}
if (!NILP (set_minimum))
w->min_hscroll = w->hscroll;
- w->suspend_auto_hscroll = 1;
+ w->suspend_auto_hscroll = true;
return result;
}
start_display (&it, w, start);
move_it_vertically (&it, height);
bottom_y = line_bottom_y (&it);
- bidi_unshelve_cache (itdata, 0);
+ bidi_unshelve_cache (itdata, false);
/* rms: On a non-window display,
the value of it.vpos at the bottom of the screen
{
struct window *w = XWINDOW (selected_window);
struct buffer *buf = XBUFFER (w->contents);
- bool center_p = 0;
+ bool center_p = false;
ptrdiff_t charpos, bytepos;
EMACS_INT iarg IF_LINT (= 0);
int this_scroll_margin;
SET_FRAME_GARBAGED (WINDOW_XFRAME (w));
}
- center_p = 1;
+ center_p = true;
}
else if (CONSP (arg)) /* Just C-u. */
- center_p = 1;
+ center_p = true;
else
{
arg = Fprefix_numeric_value (arg);
move_it_vertically_backward (&it, window_box_height (w) / 2);
charpos = IT_CHARPOS (it);
bytepos = IT_BYTEPOS (it);
- bidi_unshelve_cache (itdata, 0);
+ bidi_unshelve_cache (itdata, false);
}
else if (iarg < 0)
{
}
if (h <= 0)
{
- bidi_unshelve_cache (itdata, 0);
+ bidi_unshelve_cache (itdata, false);
return Qnil;
}
charpos = IT_CHARPOS (it);
bytepos = IT_BYTEPOS (it);
- bidi_unshelve_cache (itdata, 0);
+ bidi_unshelve_cache (itdata, false);
}
else
{
charpos = IT_CHARPOS (it);
bytepos = IT_BYTEPOS (it);
- bidi_unshelve_cache (itdata, 0);
+ bidi_unshelve_cache (itdata, false);
}
}
else
/* Set the new window start. */
set_marker_both (w->start, w->contents, charpos, bytepos);
- w->window_end_valid = 0;
+ w->window_end_valid = false;
- w->optional_new_start = 1;
+ w->optional_new_start = true;
w->start_at_line_beg = (bytepos == BEGV_BYTE
|| FETCH_BYTE (bytepos - 1) == '\n');
struct window *w = XWINDOW (selected_window);
int lines, start;
Lisp_Object window;
-#if 0
+#if false
int this_scroll_margin;
#endif
Fvertical_motion (make_number (- (height / 2)), window, Qnil);
set_marker_both (w->start, w->contents, PT, PT_BYTE);
w->start_at_line_beg = !NILP (Fbolp ());
- w->force_start = 1;
+ w->force_start = true;
}
else
Fgoto_char (w->start);
lines = displayed_window_lines (w);
-#if 0
+#if false
this_scroll_margin = max (0, min (scroll_margin, lines / 4));
#endif
if (iarg < 0)
iarg = iarg + lines;
-#if 0 /* This code would prevent move-to-window-line from moving point
- to a place inside the scroll margins (which would cause the
- next redisplay to scroll). I wrote this code, but then concluded
- it is probably better not to install it. However, it is here
- inside #if 0 so as not to lose it. -- rms. */
+#if false /* This code would prevent move-to-window-line from moving point
+ to a place inside the scroll margins (which would cause the
+ next redisplay to scroll). I wrote this code, but then concluded
+ it is probably better not to install it. However, it is here
+ inside #if false so as not to lose it. -- rms. */
/* Don't let it get into the margin at either top or bottom. */
iarg = max (iarg, this_scroll_margin);
}
fset_redisplay (f);
- FRAME_WINDOW_SIZES_CHANGED (f) = 1;
+ FRAME_WINDOW_SIZES_CHANGED (f) = true;
/* Problem: Freeing all matrices and later allocating them again
is a serious redisplay flickering problem. What we would
(w->old_pointm, w->contents,
BUF_PT (XBUFFER (w->contents)),
BUF_PT_BYTE (XBUFFER (w->contents)));
- w->start_at_line_beg = 1;
+ w->start_at_line_beg = true;
}
else if (!NILP (w->start))
/* Leaf window has no live buffer, get one. */
set_marker_restricted_both (w->start, w->contents, 0, 0);
set_marker_restricted_both (w->pointm, w->contents, 0, 0);
set_marker_restricted_both (w->old_pointm, w->contents, 0, 0);
- w->start_at_line_beg = 1;
+ w->start_at_line_beg = true;
if (!NILP (w->dedicated))
/* Record this window as dead. */
dead_windows = Fcons (window, dead_windows);
Do not record the buffer here. We do that in a separate call
to select_window below. See also Bug#16207. */
- select_window (data->current_window, Qt, 1);
+ select_window (data->current_window, Qt, true);
BVAR (XBUFFER (XWINDOW (selected_window)->contents),
last_selected_window)
= selected_window;
/* Allow x_set_window_size again and apply frame size changes if
needed. */
f->can_x_set_window_size = true;
- adjust_frame_size (f, -1, -1, 1, 0, Qset_window_configuration);
+ adjust_frame_size (f, -1, -1, 1, false, Qset_window_configuration);
adjust_frame_glyphs (f);
unblock_input ();
/* Record the selected window's buffer here. The window should
already be the selected one from the call above. */
- select_window (data->current_window, Qnil, 0);
+ select_window (data->current_window, Qnil, false);
/* Fselect_window will have made f the selected frame, so we
reselect the proper frame here. Fhandle_switch_frame will change the
if (WINDOWP (w->contents))
{
delete_all_child_windows (w->contents);
- wset_combination (w, 0, Qnil);
+ wset_combination (w, false, Qnil);
}
else if (BUFFERP (w->contents))
{
{
eassert (w);
clear_glyph_matrix (w->current_matrix);
- w->window_end_valid = 0;
+ w->window_end_valid = false;
windows_or_buffers_changed = 30;
wset_redisplay (w);
adjust_frame_glyphs (XFRAME (WINDOW_FRAME (w)));
set_window_fringes (struct window *w, Lisp_Object left_width,
Lisp_Object right_width, Lisp_Object outside_margins)
{
- int left, right, outside = !NILP (outside_margins);
+ int left, right;
+ bool outside = !NILP (outside_margins);
left = (NILP (left_width) ? -1
: (CHECK_NATNUM (left_width), XINT (left_width)));
Lisp_Object horizontal_type)
{
int iwidth = (NILP (width) ? -1 : (CHECK_NATNUM (width), XINT (width)));
- bool changed = 0;
+ bool changed = false;
if (iwidth == 0)
vertical_type = Qnil;
{
w->scroll_bar_width = iwidth;
wset_vertical_scroll_bar_type (w, vertical_type);
- changed = 1;
+ changed = true;
}
}
{
w->scroll_bar_height = iheight;
wset_horizontal_scroll_bar_type (w, horizontal_type);
- changed = 1;
+ changed = true;
}
}
}
adjust_frame_glyphs (f);
/* Prevent redisplay shortcuts. */
- XBUFFER (w->contents)->prevent_redisplay_optimizations_p = 1;
+ XBUFFER (w->contents)->prevent_redisplay_optimizations_p = true;
}
}
additional argument USER_DATA. Stops when FN returns 0. */
static void
-foreach_window (struct frame *f, int (*fn) (struct window *, void *),
+foreach_window (struct frame *f, bool (*fn) (struct window *, void *),
void *user_data)
{
/* delete_frame may set FRAME_ROOT_WINDOW (f) to Qnil. */
/* Helper function for foreach_window. Call FN for all leaf windows
reachable from W. FN is called with the first argument being a
pointer to the leaf window, and with additional argument USER_DATA.
- Stop when FN returns 0. Value is 0 if stopped by FN. */
+ Stop when FN returns false. Value is false if stopped by FN. */
-static int
-foreach_window_1 (struct window *w, int (*fn) (struct window *, void *), void *user_data)
+static bool
+foreach_window_1 (struct window *w, bool (*fn) (struct window *, void *),
+ void *user_data)
{
- int cont;
+ bool cont;
- for (cont = 1; w && cont;)
+ for (cont = true; w && cont;)
{
if (WINDOWP (w->contents))
cont = foreach_window_1 (XWINDOW (w->contents), fn, user_data);
Initialization
***********************************************************************/
-/* Return 1 if window configurations CONFIGURATION1 and CONFIGURATION2
+/* Return true if window configurations CONFIGURATION1 and CONFIGURATION2
describe the same state of affairs. This is used by Fequal.
IGNORE_POSITIONS means ignore non-matching scroll positions
|| !EQ (d1->focus_frame, d2->focus_frame)
/* Verify that the two configurations have the same number of windows. */
|| sws1->header.size != sws2->header.size)
- return 0;
+ return false;
for (i = 0; i < sws1->header.size; i++)
{
|| !EQ (sw1->scroll_bar_height, sw2->scroll_bar_height)
|| !EQ (sw1->vertical_scroll_bar_type, sw2->vertical_scroll_bar_type)
|| !EQ (sw1->horizontal_scroll_bar_type, sw2->horizontal_scroll_bar_type))
- return 0;
+ return false;
}
- return 1;
+ return true;
}
DEFUN ("compare-window-configurations", Fcompare_window_configurations,
and scrolling positions. */)
(Lisp_Object x, Lisp_Object y)
{
- if (compare_window_configurations (x, y, 1))
+ if (compare_window_configurations (x, y, true))
return Qt;
return Qnil;
}