Commit 7556890b authored by Richard M. Stallman's avatar Richard M. Stallman

Renamings: frame->display => frame->output, struct x_display -> sruct x_output.

parent f39d1692
......@@ -1261,12 +1261,12 @@ update_frame (f, force, inhibit_hairy_id)
#ifdef HAVE_X_WINDOWS
if (FRAME_X_P (f))
{
leftmost = downto = f->display.x->internal_border_width;
leftmost = downto = f->output_data.x->internal_border_width;
if (desired_frame->enable[0])
{
current_frame->top_left_x[FRAME_HEIGHT (f) - 1] = leftmost;
current_frame->top_left_y[FRAME_HEIGHT (f) - 1]
= PIXEL_HEIGHT (f) - f->display.x->internal_border_width
= PIXEL_HEIGHT (f) - f->output_data.x->internal_border_width
- current_frame->pix_height[FRAME_HEIGHT (f) - 1];
current_frame->top_left_x[0] = leftmost;
current_frame->top_left_y[0] = downto;
......@@ -1627,9 +1627,9 @@ update_line (frame, vpos)
{
current_frame->pix_width[vpos]
= current_frame->used[vpos]
* FONT_WIDTH (frame->display.x->font);
* FONT_WIDTH (frame->output_data.x->font);
current_frame->pix_height[vpos]
= frame->display.x->line_height;
= frame->output_data.x->line_height;
}
#endif /* HAVE_X_WINDOWS */
......
......@@ -158,7 +158,7 @@ make_frame (mini_p)
f->desired_glyphs = 0;
f->visible = 0;
f->async_visible = 0;
f->display.nothing = 0;
f->output_data.nothing = 0;
f->iconified = 0;
f->async_iconified = 0;
f->wants_modeline = 1;
......@@ -377,7 +377,7 @@ make_terminal_frame ()
f->visible = 1; /* FRAME_SET_VISIBLE wd set frame_garbaged. */
f->async_visible = 1; /* Don't let visible be cleared later. */
f->display.nothing = 1; /* Nonzero means frame isn't deleted. */
f->output_data.nothing = 1; /* Nonzero means frame isn't deleted. */
return f;
}
......@@ -1036,7 +1036,7 @@ but if the second optional argument FORCE is non-nil, you may do so.")
x_destroy_window (f);
#endif
f->display.nothing = 0;
f->output_data.nothing = 0;
/* If we've deleted the last_nonminibuf_frame, then try to find
another one. */
......
......@@ -87,13 +87,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
(assq FACE-NAME global-face-data) returns a vector describing the
global parameters for that face.
Let PARAM-FACE be FRAME->display.x->param_faces[Faref (FACE-VECTOR, 2)].
Let PARAM-FACE be FRAME->output_data.x->param_faces[Faref (FACE-VECTOR, 2)].
PARAM_FACE is a struct face whose members are the Xlib analogues of
the parameters in FACE-VECTOR. If an element of FACE-VECTOR is
nil, then the corresponding member of PARAM_FACE is FACE_DEFAULT.
These faces are called "parameter faces", because they're the ones
lisp manipulates to control what gets displayed. Elements 0 and 1
of FRAME->display.x->param_faces are special - they describe the
of FRAME->output_data.x->param_faces are special - they describe the
default and mode line faces. None of the faces in param_faces have
GC's. (See src/dispextern.h for the definiton of struct face.
lisp/faces.el maintains the isomorphism between face_alist and
......@@ -104,9 +104,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
properties. The resulting faces are called "computed faces"; none
of their members are FACE_DEFAULT; they are completely specified.
They then call intern_compute_face to search
FRAME->display.x->computed_faces for a matching face, add one if
FRAME->output_data.x->computed_faces for a matching face, add one if
none is found, and return the index into
FRAME->display.x->computed_faces. FRAME's glyph matrices use these
FRAME->output_data.x->computed_faces. FRAME's glyph matrices use these
indices to record the faces of the matrix characters, and the X
display hooks consult compute_faces to decide how to display these
characters. Elements 0 and 1 of computed_faces always describe the
......@@ -231,17 +231,17 @@ intern_face (f, face)
if (face->foreground != FACE_DEFAULT)
xgcv.foreground = face->foreground;
else
xgcv.foreground = f->display.x->foreground_pixel;
xgcv.foreground = f->output_data.x->foreground_pixel;
if (face->background != FACE_DEFAULT)
xgcv.background = face->background;
else
xgcv.background = f->display.x->background_pixel;
xgcv.background = f->output_data.x->background_pixel;
if (face->font && face->font != (XFontStruct *) FACE_DEFAULT)
xgcv.font = face->font->fid;
else
xgcv.font = f->display.x->font->fid;
xgcv.font = f->output_data.x->font->fid;
xgcv.graphics_exposures = 0;
......@@ -699,21 +699,21 @@ frame_update_line_height (f)
FRAME_PTR f;
{
int i;
int biggest = FONT_HEIGHT (f->display.x->font);
int biggest = FONT_HEIGHT (f->output_data.x->font);
for (i = 0; i < f->display.x->n_param_faces; i++)
if (f->display.x->param_faces[i] != 0
&& f->display.x->param_faces[i]->font != (XFontStruct *) FACE_DEFAULT)
for (i = 0; i < f->output_data.x->n_param_faces; i++)
if (f->output_data.x->param_faces[i] != 0
&& f->output_data.x->param_faces[i]->font != (XFontStruct *) FACE_DEFAULT)
{
int height = FONT_HEIGHT (f->display.x->param_faces[i]->font);
int height = FONT_HEIGHT (f->output_data.x->param_faces[i]->font);
if (height > biggest)
biggest = height;
}
if (biggest == f->display.x->line_height)
if (biggest == f->output_data.x->line_height)
return 0;
f->display.x->line_height = biggest;
f->output_data.x->line_height = biggest;
return 1;
}
#endif /* not HAVE_X_WINDOWS */
......@@ -1105,7 +1105,7 @@ DEFUN ("set-face-attribute-internal", Fset_face_attribute_internal,
face->font = 0; /* The one and only font. */
#else
XFontStruct *font = load_font (f, attr_value);
if (face->font != f->display.x->font)
if (face->font != f->output_data.x->font)
unload_font (f, face->font);
face->font = font;
if (frame_update_line_height (f))
......
......@@ -279,16 +279,16 @@ x_window_to_frame (dpyinfo, wdesc)
if (!GC_FRAMEP (frame))
continue;
f = XFRAME (frame);
if (f->display.nothing == 1 || FRAME_X_DISPLAY_INFO (f) != dpyinfo)
if (f->output_data.nothing == 1 || FRAME_X_DISPLAY_INFO (f) != dpyinfo)
continue;
#ifdef USE_X_TOOLKIT
if ((f->display.x->edit_widget
&& XtWindow (f->display.x->edit_widget) == wdesc)
|| f->display.x->icon_desc == wdesc)
if ((f->output_data.x->edit_widget
&& XtWindow (f->output_data.x->edit_widget) == wdesc)
|| f->output_data.x->icon_desc == wdesc)
return f;
#else /* not USE_X_TOOLKIT */
if (FRAME_X_WINDOW (f) == wdesc
|| f->display.x->icon_desc == wdesc)
|| f->output_data.x->icon_desc == wdesc)
return f;
#endif /* not USE_X_TOOLKIT */
}
......@@ -306,7 +306,7 @@ x_any_window_to_frame (dpyinfo, wdesc)
{
Lisp_Object tail, frame;
struct frame *f;
struct x_display *x;
struct x_output *x;
for (tail = Vframe_list; GC_CONSP (tail); tail = XCONS (tail)->cdr)
{
......@@ -316,7 +316,7 @@ x_any_window_to_frame (dpyinfo, wdesc)
f = XFRAME (frame);
if (f->display.nothing == 1 || FRAME_X_DISPLAY_INFO (f) != dpyinfo)
continue;
x = f->display.x;
x = f->output_data.x;
/* This frame matches if the window is any of its widgets. */
if (wdesc == XtWindow (x->widget)
|| wdesc == XtWindow (x->column_widget)
......@@ -338,7 +338,7 @@ x_non_menubar_window_to_frame (dpyinfo, wdesc)
{
Lisp_Object tail, frame;
struct frame *f;
struct x_display *x;
struct x_output *x;
for (tail = Vframe_list; GC_CONSP (tail); tail = XCONS (tail)->cdr)
{
......@@ -348,7 +348,7 @@ x_non_menubar_window_to_frame (dpyinfo, wdesc)
f = XFRAME (frame);
if (f->display.nothing == 1 || FRAME_X_DISPLAY_INFO (f) != dpyinfo)
continue;
x = f->display.x;
x = f->output_data.x;
/* This frame matches if the window is any of its widgets. */
if (wdesc == XtWindow (x->widget)
|| wdesc == XtWindow (x->column_widget)
......@@ -367,7 +367,7 @@ x_menubar_window_to_frame (dpyinfo, wdesc)
{
Lisp_Object tail, frame;
struct frame *f;
struct x_display *x;
struct x_output *x;
for (tail = Vframe_list; GC_CONSP (tail); tail = XCONS (tail)->cdr)
{
......@@ -377,7 +377,7 @@ x_menubar_window_to_frame (dpyinfo, wdesc)
f = XFRAME (frame);
if (f->display.nothing == 1 || FRAME_X_DISPLAY_INFO (f) != dpyinfo)
continue;
x = f->display.x;
x = f->output_data.x;
/* Match if the window is this frame's menubar. */
if (lw_window_is_in_menubar (wdesc, x->menubar_widget))
return f;
......@@ -395,7 +395,7 @@ x_top_window_to_frame (dpyinfo, wdesc)
{
Lisp_Object tail, frame;
struct frame *f;
struct x_display *x;
struct x_output *x;
for (tail = Vframe_list; GC_CONSP (tail); tail = XCONS (tail)->cdr)
{
......@@ -405,7 +405,7 @@ x_top_window_to_frame (dpyinfo, wdesc)
f = XFRAME (frame);
if (f->display.nothing == 1 || FRAME_X_DISPLAY_INFO (f) != dpyinfo)
continue;
x = f->display.x;
x = f->output_data.x;
/* This frame matches if the window is its topmost widget. */
if (wdesc == XtWindow (x->widget))
return f;
......@@ -807,18 +807,18 @@ x_set_frame_parameters (f, alist)
if (EQ (left, Qunbound))
{
left_no_change = 1;
if (f->display.x->left_pos < 0)
left = Fcons (Qplus, Fcons (make_number (f->display.x->left_pos), Qnil));
if (f->output_data.x->left_pos < 0)
left = Fcons (Qplus, Fcons (make_number (f->output_data.x->left_pos), Qnil));
else
XSETINT (left, f->display.x->left_pos);
XSETINT (left, f->output_data.x->left_pos);
}
if (EQ (top, Qunbound))
{
top_no_change = 1;
if (f->display.x->top_pos < 0)
top = Fcons (Qplus, Fcons (make_number (f->display.x->top_pos), Qnil));
if (f->output_data.x->top_pos < 0)
top = Fcons (Qplus, Fcons (make_number (f->output_data.x->top_pos), Qnil));
else
XSETINT (top, f->display.x->top_pos);
XSETINT (top, f->output_data.x->top_pos);
}
/* If one of the icon positions was not set, preserve or default it. */
......@@ -864,28 +864,28 @@ x_set_frame_parameters (f, alist)
if ((!NILP (left) || !NILP (top))
&& ! (left_no_change && top_no_change)
&& ! (NUMBERP (left) && XINT (left) == f->display.x->left_pos
&& NUMBERP (top) && XINT (top) == f->display.x->top_pos))
&& ! (NUMBERP (left) && XINT (left) == f->output_data.x->left_pos
&& NUMBERP (top) && XINT (top) == f->output_data.x->top_pos))
{
int leftpos = 0;
int toppos = 0;
/* Record the signs. */
f->display.x->size_hint_flags &= ~ (XNegative | YNegative);
f->output_data.x->size_hint_flags &= ~ (XNegative | YNegative);
if (EQ (left, Qminus))
f->display.x->size_hint_flags |= XNegative;
f->output_data.x->size_hint_flags |= XNegative;
else if (INTEGERP (left))
{
leftpos = XINT (left);
if (leftpos < 0)
f->display.x->size_hint_flags |= XNegative;
f->output_data.x->size_hint_flags |= XNegative;
}
else if (CONSP (left) && EQ (XCONS (left)->car, Qminus)
&& CONSP (XCONS (left)->cdr)
&& INTEGERP (XCONS (XCONS (left)->cdr)->car))
{
leftpos = - XINT (XCONS (XCONS (left)->cdr)->car);
f->display.x->size_hint_flags |= XNegative;
f->output_data.x->size_hint_flags |= XNegative;
}
else if (CONSP (left) && EQ (XCONS (left)->car, Qplus)
&& CONSP (XCONS (left)->cdr)
......@@ -895,19 +895,19 @@ x_set_frame_parameters (f, alist)
}
if (EQ (top, Qminus))
f->display.x->size_hint_flags |= YNegative;
f->output_data.x->size_hint_flags |= YNegative;
else if (INTEGERP (top))
{
toppos = XINT (top);
if (toppos < 0)
f->display.x->size_hint_flags |= YNegative;
f->output_data.x->size_hint_flags |= YNegative;
}
else if (CONSP (top) && EQ (XCONS (top)->car, Qminus)
&& CONSP (XCONS (top)->cdr)
&& INTEGERP (XCONS (XCONS (top)->cdr)->car))
{
toppos = - XINT (XCONS (XCONS (top)->cdr)->car);
f->display.x->size_hint_flags |= YNegative;
f->output_data.x->size_hint_flags |= YNegative;
}
else if (CONSP (top) && EQ (XCONS (top)->car, Qplus)
&& CONSP (XCONS (top)->cdr)
......@@ -918,10 +918,10 @@ x_set_frame_parameters (f, alist)
/* Store the numeric value of the position. */
f->display.x->top_pos = toppos;
f->display.x->left_pos = leftpos;
f->output_data.x->top_pos = toppos;
f->output_data.x->left_pos = leftpos;
f->display.x->win_gravity = NorthWestGravity;
f->output_data.x->win_gravity = NorthWestGravity;
/* Actually set that position, and convert to absolute. */
x_set_offset (f, leftpos, toppos, -1);
......@@ -949,9 +949,9 @@ x_real_positions (f, xptr, yptr)
the problem that arises when restarting window-managers. */
#ifdef USE_X_TOOLKIT
Window outer = XtWindow (f->display.x->widget);
Window outer = XtWindow (f->output_data.x->widget);
#else
Window outer = f->display.x->window_desc;
Window outer = f->output_data.x->window_desc;
#endif
Window tmp_root_window;
Window *tmp_children;
......@@ -962,7 +962,7 @@ x_real_positions (f, xptr, yptr)
x_catch_errors (FRAME_X_DISPLAY (f));
XQueryTree (FRAME_X_DISPLAY (f), outer, &tmp_root_window,
&f->display.x->parent_desc,
&f->output_data.x->parent_desc,
&tmp_children, &tmp_nchildren);
xfree (tmp_children);
......@@ -970,17 +970,17 @@ x_real_positions (f, xptr, yptr)
/* Find the position of the outside upper-left corner of
the inner window, with respect to the outer window. */
if (f->display.x->parent_desc != FRAME_X_DISPLAY_INFO (f)->root_window)
if (f->output_data.x->parent_desc != FRAME_X_DISPLAY_INFO (f)->root_window)
{
XTranslateCoordinates (FRAME_X_DISPLAY (f),
/* From-window, to-window. */
#ifdef USE_X_TOOLKIT
XtWindow (f->display.x->widget),
XtWindow (f->output_data.x->widget),
#else
f->display.x->window_desc,
f->output_data.x->window_desc,
#endif
f->display.x->parent_desc,
f->output_data.x->parent_desc,
/* From-position, to-position. */
0, 0, &win_x, &win_y,
......@@ -989,8 +989,8 @@ x_real_positions (f, xptr, yptr)
&child);
#if 0 /* The values seem to be right without this and wrong with. */
win_x += f->display.x->border_width;
win_y += f->display.x->border_width;
win_x += f->output_data.x->border_width;
win_y += f->output_data.x->border_width;
#endif
}
......@@ -1007,8 +1007,8 @@ x_real_positions (f, xptr, yptr)
x_uncatch_errors (FRAME_X_DISPLAY (f));
*xptr = f->display.x->left_pos - win_x;
*yptr = f->display.x->top_pos - win_y;
*xptr = f->output_data.x->left_pos - win_x;
*yptr = f->output_data.x->top_pos - win_y;
}
/* Insert a description of internally-recorded parameters of frame X
......@@ -1026,22 +1026,22 @@ x_report_frame_params (f, alistptr)
/* Represent negative positions (off the top or left screen edge)
in a way that Fmodify_frame_parameters will understand correctly. */
XSETINT (tem, f->display.x->left_pos);
if (f->display.x->left_pos >= 0)
XSETINT (tem, f->output_data.x->left_pos);
if (f->output_data.x->left_pos >= 0)
store_in_alist (alistptr, Qleft, tem);
else
store_in_alist (alistptr, Qleft, Fcons (Qplus, Fcons (tem, Qnil)));
XSETINT (tem, f->display.x->top_pos);
if (f->display.x->top_pos >= 0)
XSETINT (tem, f->output_data.x->top_pos);
if (f->output_data.x->top_pos >= 0)
store_in_alist (alistptr, Qtop, tem);
else
store_in_alist (alistptr, Qtop, Fcons (Qplus, Fcons (tem, Qnil)));
store_in_alist (alistptr, Qborder_width,
make_number (f->display.x->border_width));
make_number (f->output_data.x->border_width));
store_in_alist (alistptr, Qinternal_border_width,
make_number (f->display.x->internal_border_width));
make_number (f->output_data.x->internal_border_width));
sprintf (buf, "%ld", (long) FRAME_X_WINDOW (f));
store_in_alist (alistptr, Qwindow_id,
build_string (buf));
......@@ -1182,15 +1182,15 @@ x_set_foreground_color (f, arg, oldval)
struct frame *f;
Lisp_Object arg, oldval;
{
f->display.x->foreground_pixel
f->output_data.x->foreground_pixel
= x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
if (FRAME_X_WINDOW (f) != 0)
{
BLOCK_INPUT;
XSetForeground (FRAME_X_DISPLAY (f), f->display.x->normal_gc,
f->display.x->foreground_pixel);
XSetBackground (FRAME_X_DISPLAY (f), f->display.x->reverse_gc,
f->display.x->foreground_pixel);
XSetForeground (FRAME_X_DISPLAY (f), f->output_data.x->normal_gc,
f->output_data.x->foreground_pixel);
XSetBackground (FRAME_X_DISPLAY (f), f->output_data.x->reverse_gc,
f->output_data.x->foreground_pixel);
UNBLOCK_INPUT;
recompute_basic_faces (f);
if (FRAME_VISIBLE_P (f))
......@@ -1206,28 +1206,28 @@ x_set_background_color (f, arg, oldval)
Pixmap temp;
int mask;
f->display.x->background_pixel
f->output_data.x->background_pixel
= x_decode_color (f, arg, WHITE_PIX_DEFAULT (f));
if (FRAME_X_WINDOW (f) != 0)
{
BLOCK_INPUT;
/* The main frame area. */
XSetBackground (FRAME_X_DISPLAY (f), f->display.x->normal_gc,
f->display.x->background_pixel);
XSetForeground (FRAME_X_DISPLAY (f), f->display.x->reverse_gc,
f->display.x->background_pixel);
XSetForeground (FRAME_X_DISPLAY (f), f->display.x->cursor_gc,
f->display.x->background_pixel);
XSetBackground (FRAME_X_DISPLAY (f), f->output_data.x->normal_gc,
f->output_data.x->background_pixel);
XSetForeground (FRAME_X_DISPLAY (f), f->output_data.x->reverse_gc,
f->output_data.x->background_pixel);
XSetForeground (FRAME_X_DISPLAY (f), f->output_data.x->cursor_gc,
f->output_data.x->background_pixel);
XSetWindowBackground (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
f->display.x->background_pixel);
f->output_data.x->background_pixel);
{
Lisp_Object bar;
for (bar = FRAME_SCROLL_BARS (f); !NILP (bar);
bar = XSCROLL_BAR (bar)->next)
XSetWindowBackground (FRAME_X_DISPLAY (f),
SCROLL_BAR_X_WINDOW (XSCROLL_BAR (bar)),
f->display.x->background_pixel);
f->output_data.x->background_pixel);
}
UNBLOCK_INPUT;
......@@ -1247,13 +1247,13 @@ x_set_mouse_color (f, arg, oldval)
int mask_color;
if (!EQ (Qnil, arg))
f->display.x->mouse_pixel
f->output_data.x->mouse_pixel
= x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
mask_color = f->display.x->background_pixel;
mask_color = f->output_data.x->background_pixel;
/* No invisible pointers. */
if (mask_color == f->display.x->mouse_pixel
&& mask_color == f->display.x->background_pixel)
f->display.x->mouse_pixel = f->display.x->foreground_pixel;
if (mask_color == f->output_data.x->mouse_pixel
&& mask_color == f->output_data.x->background_pixel)
f->output_data.x->mouse_pixel = f->output_data.x->foreground_pixel;
BLOCK_INPUT;
......@@ -1306,7 +1306,7 @@ x_set_mouse_color (f, arg, oldval)
{
XColor fore_color, back_color;
fore_color.pixel = f->display.x->mouse_pixel;
fore_color.pixel = f->output_data.x->mouse_pixel;
back_color.pixel = mask_color;
XQueryColor (FRAME_X_DISPLAY (f),
DefaultColormap (FRAME_X_DISPLAY (f),
......@@ -1331,23 +1331,23 @@ x_set_mouse_color (f, arg, oldval)
XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), cursor);
}
if (cursor != f->display.x->text_cursor && f->display.x->text_cursor != 0)
XFreeCursor (FRAME_X_DISPLAY (f), f->display.x->text_cursor);
f->display.x->text_cursor = cursor;
if (cursor != f->output_data.x->text_cursor && f->output_data.x->text_cursor != 0)
XFreeCursor (FRAME_X_DISPLAY (f), f->output_data.x->text_cursor);
f->output_data.x->text_cursor = cursor;
if (nontext_cursor != f->display.x->nontext_cursor
&& f->display.x->nontext_cursor != 0)
XFreeCursor (FRAME_X_DISPLAY (f), f->display.x->nontext_cursor);
f->display.x->nontext_cursor = nontext_cursor;
if (nontext_cursor != f->output_data.x->nontext_cursor
&& f->output_data.x->nontext_cursor != 0)
XFreeCursor (FRAME_X_DISPLAY (f), f->output_data.x->nontext_cursor);
f->output_data.x->nontext_cursor = nontext_cursor;
if (mode_cursor != f->display.x->modeline_cursor
&& f->display.x->modeline_cursor != 0)
XFreeCursor (FRAME_X_DISPLAY (f), f->display.x->modeline_cursor);
f->display.x->modeline_cursor = mode_cursor;
if (cross_cursor != f->display.x->cross_cursor
&& f->display.x->cross_cursor != 0)
XFreeCursor (FRAME_X_DISPLAY (f), f->display.x->cross_cursor);
f->display.x->cross_cursor = cross_cursor;
if (mode_cursor != f->output_data.x->modeline_cursor
&& f->output_data.x->modeline_cursor != 0)
XFreeCursor (FRAME_X_DISPLAY (f), f->output_data.x->modeline_cursor);
f->output_data.x->modeline_cursor = mode_cursor;
if (cross_cursor != f->output_data.x->cross_cursor
&& f->output_data.x->cross_cursor != 0)
XFreeCursor (FRAME_X_DISPLAY (f), f->output_data.x->cross_cursor);
f->output_data.x->cross_cursor = cross_cursor;
XFlush (FRAME_X_DISPLAY (f));
UNBLOCK_INPUT;
......@@ -1364,24 +1364,24 @@ x_set_cursor_color (f, arg, oldval)
fore_pixel = x_decode_color (f, Vx_cursor_fore_pixel,
WHITE_PIX_DEFAULT (f));
else
fore_pixel = f->display.x->background_pixel;
f->display.x->cursor_pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
fore_pixel = f->output_data.x->background_pixel;
f->output_data.x->cursor_pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
/* Make sure that the cursor color differs from the background color. */
if (f->display.x->cursor_pixel == f->display.x->background_pixel)
if (f->output_data.x->cursor_pixel == f->output_data.x->background_pixel)
{
f->display.x->cursor_pixel = f->display.x->mouse_pixel;
if (f->display.x->cursor_pixel == fore_pixel)
fore_pixel = f->display.x->background_pixel;
f->output_data.x->cursor_pixel = f->output_data.x->mouse_pixel;
if (f->output_data.x->cursor_pixel == fore_pixel)
fore_pixel = f->output_data.x->background_pixel;
}
f->display.x->cursor_foreground_pixel = fore_pixel;
f->output_data.x->cursor_foreground_pixel = fore_pixel;
if (FRAME_X_WINDOW (f) != 0)
{
BLOCK_INPUT;
XSetBackground (FRAME_X_DISPLAY (f), f->display.x->cursor_gc,
f->display.x->cursor_pixel);
XSetForeground (FRAME_X_DISPLAY (f), f->display.x->cursor_gc,
XSetBackground (FRAME_X_DISPLAY (f), f->output_data.x->cursor_gc,
f->output_data.x->cursor_pixel);
XSetForeground (FRAME_X_DISPLAY (f), f->output_data.x->cursor_gc,
fore_pixel);
UNBLOCK_INPUT;
......@@ -1428,9 +1428,9 @@ x_set_border_pixel (f, pix)
struct frame *f;
int pix;
{
f->display.x->border_pixel = pix;
f->output_data.x->border_pixel = pix;
if (FRAME_X_WINDOW (f) != 0 && f->display.x->border_width > 0)
if (FRAME_X_WINDOW (f) != 0 && f->output_data.x->border_width > 0)
{
Pixmap temp;
int mask;
......@@ -1453,13 +1453,13 @@ x_set_cursor_type (f, arg, oldval)
if (EQ (arg, Qbar))
{
FRAME_DESIRED_CURSOR (f) = bar_cursor;
f->display.x->cursor_width = 2;
f->output_data.x->cursor_width = 2;
}
else if (CONSP (arg) && EQ (XCONS (arg)->car, Qbar)
&& INTEGERP (XCONS (arg)->cdr))
{
FRAME_DESIRED_CURSOR (f) = bar_cursor;
f->display.x->cursor_width = XINT (XCONS (arg)->cdr);
f->output_data.x->cursor_width = XINT (XCONS (arg)->cdr);
}
else
/* Treat anything unknown as "box cursor".
......@@ -1540,7 +1540,7 @@ x_set_icon_name (f, arg, oldval)
f->icon_name = arg;
if (f->display.x->icon_bitmap != 0)
if (f->output_data.x->icon_bitmap != 0)
return;
BLOCK_INPUT;
......@@ -1595,13 +1595,13 @@ x_set_border_width (f, arg, oldval)
{
CHECK_NUMBER (arg, 0);
if (XINT (arg) == f->display.x->border_width)
if (XINT (arg) == f->output_data.x->border_width)
return;
if (FRAME_X_WINDOW (f) != 0)
error ("Cannot change the border width of a window");
f->display.x->border_width = XINT (arg);
f->output_data.x->border_width = XINT (arg);
}
void
......@@ -1610,14 +1610,14 @@ x_set_internal_border_width (f, arg, oldval)
Lisp_Object arg, oldval;
{
int mask;
int old = f->display.x->internal_border_width;
int old = f->output_data.x->internal_border_width;
CHECK_NUMBER (arg, 0);
f->display.x->internal_border_width = XINT (arg);