x_update_window_end (struct window *w, int cursor_on_p,
int mouse_face_overwritten_p)
{
- Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (WVAR (w, frame)));
+ Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (WGET (w, frame)));
if (!w->pseudo_window_p)
{
overhead is very small. */
if (windows_or_buffers_changed
&& desired_row->full_width_p
- && (f = XFRAME (WVAR (w, frame)),
+ && (f = XFRAME (WGET (w, frame)),
width = FRAME_INTERNAL_BORDER_WIDTH (f),
width != 0)
&& (height = desired_row->visible_height,
static void
x_scroll_run (struct window *w, struct run *run)
{
- struct frame *f = XFRAME (WVAR (w, frame));
+ struct frame *f = XFRAME (WGET (w, frame));
int x, y, width, height, from_y, to_y, bottom_y;
HWND hwnd = FRAME_W32_WINDOW (f);
HRGN expect_dirty;
: dpyinfo->w32_focus_frame);
if (! FRAME_LIVE_P (dpyinfo->x_highlight_frame))
{
- FRAME_FOCUS_FRAME (dpyinfo->w32_focus_frame) = Qnil;
+ FSET (dpyinfo->w32_focus_frame, focus_frame, Qnil);
dpyinfo->x_highlight_frame = dpyinfo->w32_focus_frame;
}
}
SCROLLINFO si;
struct scroll_bar *bar
= XSCROLL_BAR (Fmake_vector (make_number (SCROLL_BAR_VEC_SIZE), Qnil));
+ Lisp_Object barobj;
BLOCK_INPUT;
/* Add bar to its frame's list of scroll bars. */
bar->next = FRAME_SCROLL_BARS (f);
bar->prev = Qnil;
- XSETVECTOR (FRAME_SCROLL_BARS (f), bar);
+ XSETVECTOR (barobj, bar);
+ FSET (f, scroll_bars, barobj);
if (! NILP (bar->next))
XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar);
my_destroy_window (f, SCROLL_BAR_W32_WINDOW (bar));
/* Dissociate this scroll bar from its window. */
- WVAR (XWINDOW (bar->window), vertical_scroll_bar) = Qnil;
+ WSET (XWINDOW (bar->window), vertical_scroll_bar, Qnil);
UNBLOCK_INPUT;
}
w32_set_vertical_scroll_bar (struct window *w,
int portion, int whole, int position)
{
- struct frame *f = XFRAME (WVAR (w, frame));
+ struct frame *f = XFRAME (WGET (w, frame));
+ Lisp_Object barobj;
struct scroll_bar *bar;
int top, height, left, sb_left, width, sb_width;
int window_y, window_height;
|| WINDOW_RIGHT_MARGIN_COLS (w) == 0));
/* Does the scroll bar exist yet? */
- if (NILP (WVAR (w, vertical_scroll_bar)))
+ if (NILP (WGET (w, vertical_scroll_bar)))
{
HDC hdc;
BLOCK_INPUT;
/* It may just need to be moved and resized. */
HWND hwnd;
- bar = XSCROLL_BAR (WVAR (w, vertical_scroll_bar));
+ bar = XSCROLL_BAR (WGET (w, vertical_scroll_bar));
hwnd = SCROLL_BAR_W32_WINDOW (bar);
/* If already correctly positioned, do nothing. */
bar->fringe_extended_p = fringe_extended_p ? Qt : Qnil;
w32_set_scroll_bar_thumb (bar, portion, position, whole);
-
- XSETVECTOR (WVAR (w, vertical_scroll_bar), bar);
+ XSETVECTOR (barobj, bar);
+ WSET (w, vertical_scroll_bar, barobj);
}
{
Lisp_Object bar;
bar = FRAME_SCROLL_BARS (frame);
- FRAME_SCROLL_BARS (frame) = XSCROLL_BAR (bar)->next;
+ FSET (frame, scroll_bars, XSCROLL_BAR (bar)->next);
XSCROLL_BAR (bar)->next = FRAME_CONDEMNED_SCROLL_BARS (frame);
XSCROLL_BAR (bar)->prev = Qnil;
if (! NILP (FRAME_CONDEMNED_SCROLL_BARS (frame)))
XSCROLL_BAR (FRAME_CONDEMNED_SCROLL_BARS (frame))->prev = bar;
- FRAME_CONDEMNED_SCROLL_BARS (frame) = bar;
+ FSET (frame, condemned_scroll_bars, bar);
}
}
w32_redeem_scroll_bar (struct window *window)
{
struct scroll_bar *bar;
+ Lisp_Object barobj;
struct frame *f;
/* We can't redeem this window's scroll bar if it doesn't have one. */
- if (NILP (WVAR (window, vertical_scroll_bar)))
+ if (NILP (WGET (window, vertical_scroll_bar)))
abort ();
- bar = XSCROLL_BAR (WVAR (window, vertical_scroll_bar));
+ bar = XSCROLL_BAR (WGET (window, vertical_scroll_bar));
/* Unlink it from the condemned list. */
f = XFRAME (WINDOW_FRAME (window));
{
/* If the prev pointer is nil, it must be the first in one of
the lists. */
- if (EQ (FRAME_SCROLL_BARS (f), WVAR (window, vertical_scroll_bar)))
+ if (EQ (FRAME_SCROLL_BARS (f), WGET (window, vertical_scroll_bar)))
/* It's not condemned. Everything's fine. */
return;
else if (EQ (FRAME_CONDEMNED_SCROLL_BARS (f),
- WVAR (window, vertical_scroll_bar)))
- FRAME_CONDEMNED_SCROLL_BARS (f) = bar->next;
+ WGET (window, vertical_scroll_bar)))
+ FSET (f, condemned_scroll_bars, bar->next);
else
/* If its prev pointer is nil, it must be at the front of
one or the other! */
bar->next = FRAME_SCROLL_BARS (f);
bar->prev = Qnil;
- XSETVECTOR (FRAME_SCROLL_BARS (f), bar);
+ XSETVECTOR (barobj, bar);
+ FSET (f, scroll_bars, barobj);
if (! NILP (bar->next))
XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar);
}
/* Clear out the condemned list now so we won't try to process any
more events on the hapless scroll bars. */
- FRAME_CONDEMNED_SCROLL_BARS (f) = Qnil;
+ FSET (f, condemned_scroll_bars, Qnil);
for (; ! NILP (bar); bar = next)
{
/* We may get paint messages even though the client
area is clipped - these are not expose events. */
DebPrint (("clipped frame %p (%s) got WM_PAINT - ignored\n", f,
- SDATA (FVAR (f, name))));
+ SDATA (f->name)));
}
else if (f->async_visible != 1)
{
f->async_iconified = 0;
SET_FRAME_GARBAGED (f);
DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f,
- SDATA (FVAR (f, name))));
+ SDATA (f->name)));
/* WM_PAINT serves as MapNotify as well, so report
visibility changes properly. */
if (f && !f->iconified)
{
if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
- && !EQ (FVAR (f, tool_bar_window), hlinfo->mouse_face_window))
+ && !EQ (f->tool_bar_window, hlinfo->mouse_face_window))
{
clear_mouse_face (hlinfo);
hlinfo->mouse_face_hidden = 1;
if (f && !f->iconified)
{
if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
- && !EQ (FVAR (f, tool_bar_window), hlinfo->mouse_face_window))
+ && !EQ (f->tool_bar_window, hlinfo->mouse_face_window))
{
clear_mouse_face (hlinfo);
hlinfo->mouse_face_hidden = 1;
if (f && !f->iconified)
{
if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
- && !EQ (FVAR (f, tool_bar_window), hlinfo->mouse_face_window))
+ && !EQ (f->tool_bar_window, hlinfo->mouse_face_window))
{
clear_mouse_face (hlinfo);
hlinfo->mouse_face_hidden = 1;
create event iff we don't leave the
selected frame. */
&& (focus_follows_mouse
- || (EQ (WVAR (XWINDOW (window), frame),
- WVAR (XWINDOW (selected_window), frame)))))
+ || (EQ (WGET (XWINDOW (window), frame),
+ WGET (XWINDOW (selected_window), frame)))))
{
inev.kind = SELECT_WINDOW_EVENT;
inev.frame_or_window = window;
construct_mouse_click (&inev, &msg, f);
/* Is this in the tool-bar? */
- if (WINDOWP (FVAR (f, tool_bar_window))
- && WINDOW_TOTAL_LINES (XWINDOW (FVAR (f, tool_bar_window))))
+ if (WINDOWP (f->tool_bar_window)
+ && WINDOW_TOTAL_LINES (XWINDOW (f->tool_bar_window)))
{
Lisp_Object window;
int x = XFASTINT (inev.x);
window = window_from_coordinates (f, x, y, 0, 1);
- if (EQ (window, FVAR (f, tool_bar_window)))
+ if (EQ (window, f->tool_bar_window))
{
w32_handle_tool_bar_click (f, &inev);
tool_bar_p = 1;
if (!FRAME_OBSCURED_P (f))
{
DebPrint (("frame %p (%s) obscured\n", f,
- SDATA (FVAR (f, name))));
+ SDATA (f->name)));
}
}
else
{
SET_FRAME_GARBAGED (f);
DebPrint (("obscured frame %p (%s) found to be visible\n", f,
- SDATA (FVAR (f, name))));
+ SDATA (f->name)));
/* Force a redisplay sooner or later. */
record_asynch_buffer_change ();
x_draw_bar_cursor (struct window *w, struct glyph_row *row,
int width, enum text_cursor_kinds kind)
{
- struct frame *f = XFRAME (WVAR (w, frame));
+ struct frame *f = XFRAME (WGET (w, frame));
struct glyph *cursor_glyph;
/* If cursor is out of bounds, don't draw garbage. This can happen
SET_FRAME_GARBAGED (f);
/* If cursor was outside the new size, mark it as off. */
- mark_window_cursors_off (XWINDOW (FVAR (f, root_window)));
+ mark_window_cursors_off (XWINDOW (f->root_window));
/* Clear out any recollection of where the mouse highlighting was,
since it might be in a place that's outside the new frame size.