Renamings: frame->display => frame->output, struct x_display -> sruct x_output.
authorRichard M. Stallman <rms@gnu.org>
Tue, 25 Jul 1995 21:55:50 +0000 (21:55 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 25 Jul 1995 21:55:50 +0000 (21:55 +0000)
src/dispnew.c
src/frame.c
src/xfaces.c
src/xfns.c
src/xmenu.c
src/xterm.c

index 455d158..2b94929 100644 (file)
@@ -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 */
 
index 3c1a61e..97ce72f 100644 (file)
@@ -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.  */
index 59e09d9..b2c410d 100644 (file)
@@ -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))
index 235d602..ec30758 100644 (file)
@@ -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);
-  if (f->display.x->internal_border_width < 0)
-    f->display.x->internal_border_width = 0;
+  f->output_data.x->internal_border_width = XINT (arg);
+  if (f->output_data.x->internal_border_width < 0)
+    f->output_data.x->internal_border_width = 0;
 
-  if (f->display.x->internal_border_width == old)
+  if (f->output_data.x->internal_border_width == old)
     return;
 
   if (FRAME_X_WINDOW (f) != 0)
@@ -1700,7 +1700,7 @@ x_set_menu_bar_lines (f, value, oldval)
       if (FRAME_EXTERNAL_MENU_BAR (f) == 1)
        free_frame_menubar (f);
       FRAME_EXTERNAL_MENU_BAR (f) = 0;
-      f->display.x->menubar_widget = 0;
+      f->output_data.x->menubar_widget = 0;
     }
 #else /* not USE_X_TOOLKIT */
   FRAME_MENU_BAR_LINES (f) = nlines;
@@ -1777,8 +1777,8 @@ x_set_name (f, name, explicit)
        icon.nitems = XSTRING (icon_name)->size;
 #ifdef USE_X_TOOLKIT
        XSetWMName (FRAME_X_DISPLAY (f),
-                   XtWindow (f->display.x->widget), &text);
-       XSetWMIconName (FRAME_X_DISPLAY (f), XtWindow (f->display.x->widget),
+                   XtWindow (f->output_data.x->widget), &text);
+       XSetWMIconName (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget),
                        &icon);
 #else /* not USE_X_TOOLKIT */
        XSetWMName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &text);
@@ -1874,7 +1874,7 @@ x_set_scroll_bar_width (f, arg, oldval)
   else if (INTEGERP (arg) && XINT (arg) > 0
           && XFASTINT (arg) != FRAME_SCROLL_BAR_PIXEL_WIDTH (f))
     {
-      int wid = FONT_WIDTH (f->display.x->font);
+      int wid = FONT_WIDTH (f->output_data.x->font);
       FRAME_SCROLL_BAR_PIXEL_WIDTH (f) = XFASTINT (arg);
       FRAME_SCROLL_BAR_COLS (f) = (XFASTINT (arg) + wid-1) / wid;
       if (FRAME_X_WINDOW (f))
@@ -2246,8 +2246,8 @@ x_figure_window_size (f, parms)
   f->height = DEFAULT_ROWS;
   /* Window managers expect that if program-specified
      positions are not (0,0), they're intentional, not defaults.  */
-  f->display.x->top_pos = 0;
-  f->display.x->left_pos = 0;
+  f->output_data.x->top_pos = 0;
+  f->output_data.x->left_pos = 0;
 
   tem0 = x_get_arg (parms, Qheight, 0, 0, number);
   tem1 = x_get_arg (parms, Qwidth, 0, 0, number);
@@ -2270,14 +2270,14 @@ x_figure_window_size (f, parms)
        window_prompting |= PSize;
     }
 
-  f->display.x->vertical_scroll_bar_extra
+  f->output_data.x->vertical_scroll_bar_extra
     = (!FRAME_HAS_VERTICAL_SCROLL_BARS (f)
        ? 0
        : FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0
        ? FRAME_SCROLL_BAR_PIXEL_WIDTH (f)
-       : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->display.x->font)));
-  f->display.x->pixel_width = CHAR_TO_PIXEL_WIDTH (f, f->width);
-  f->display.x->pixel_height = CHAR_TO_PIXEL_HEIGHT (f, f->height);
+       : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.x->font)));
+  f->output_data.x->pixel_width = CHAR_TO_PIXEL_WIDTH (f, f->width);
+  f->output_data.x->pixel_height = CHAR_TO_PIXEL_HEIGHT (f, f->height);
 
   tem0 = x_get_arg (parms, Qtop, 0, 0, number);
   tem1 = x_get_arg (parms, Qleft, 0, 0, number);
@@ -2286,57 +2286,57 @@ x_figure_window_size (f, parms)
     {
       if (EQ (tem0, Qminus))
        {
-         f->display.x->top_pos = 0;
+         f->output_data.x->top_pos = 0;
          window_prompting |= YNegative;
        }
       else if (CONSP (tem0) && EQ (XCONS (tem0)->car, Qminus)
               && CONSP (XCONS (tem0)->cdr)
               && INTEGERP (XCONS (XCONS (tem0)->cdr)->car))
        {
-         f->display.x->top_pos = - XINT (XCONS (XCONS (tem0)->cdr)->car);
+         f->output_data.x->top_pos = - XINT (XCONS (XCONS (tem0)->cdr)->car);
          window_prompting |= YNegative;
        }
       else if (CONSP (tem0) && EQ (XCONS (tem0)->car, Qplus)
               && CONSP (XCONS (tem0)->cdr)
               && INTEGERP (XCONS (XCONS (tem0)->cdr)->car))
        {
-         f->display.x->top_pos = XINT (XCONS (XCONS (tem0)->cdr)->car);
+         f->output_data.x->top_pos = XINT (XCONS (XCONS (tem0)->cdr)->car);
        }
       else if (EQ (tem0, Qunbound))
-       f->display.x->top_pos = 0;
+       f->output_data.x->top_pos = 0;
       else
        {
          CHECK_NUMBER (tem0, 0);
-         f->display.x->top_pos = XINT (tem0);
-         if (f->display.x->top_pos < 0)
+         f->output_data.x->top_pos = XINT (tem0);
+         if (f->output_data.x->top_pos < 0)
            window_prompting |= YNegative;
        }
 
       if (EQ (tem1, Qminus))
        {
-         f->display.x->left_pos = 0;
+         f->output_data.x->left_pos = 0;
          window_prompting |= XNegative;
        }
       else if (CONSP (tem1) && EQ (XCONS (tem1)->car, Qminus)
               && CONSP (XCONS (tem1)->cdr)
               && INTEGERP (XCONS (XCONS (tem1)->cdr)->car))
        {
-         f->display.x->left_pos = - XINT (XCONS (XCONS (tem1)->cdr)->car);
+         f->output_data.x->left_pos = - XINT (XCONS (XCONS (tem1)->cdr)->car);
          window_prompting |= XNegative;
        }
       else if (CONSP (tem1) && EQ (XCONS (tem1)->car, Qplus)
               && CONSP (XCONS (tem1)->cdr)
               && INTEGERP (XCONS (XCONS (tem1)->cdr)->car))
        {
-         f->display.x->left_pos = XINT (XCONS (XCONS (tem1)->cdr)->car);
+         f->output_data.x->left_pos = XINT (XCONS (XCONS (tem1)->cdr)->car);
        }
       else if (EQ (tem1, Qunbound))
-       f->display.x->left_pos = 0;
+       f->output_data.x->left_pos = 0;
       else
        {
          CHECK_NUMBER (tem1, 0);
-         f->display.x->left_pos = XINT (tem1);
-         if (f->display.x->left_pos < 0)
+         f->output_data.x->left_pos = XINT (tem1);
+         if (f->output_data.x->left_pos < 0)
            window_prompting |= XNegative;
        }
 
@@ -2467,12 +2467,12 @@ x_window (f, window_prompting, minibuffer_only)
   XtSetArg (al[ac], XtNallowShellResize, 1); ac++;
   XtSetArg (al[ac], XtNinput, 1); ac++;
   XtSetArg (al[ac], XtNmappedWhenManaged, 0); ac++;
-  XtSetArg (al[ac], XtNborderWidth, f->display.x->border_width); ac++;
+  XtSetArg (al[ac], XtNborderWidth, f->output_data.x->border_width); ac++;
   shell_widget = XtAppCreateShell (f->namebuf, EMACS_CLASS,
                                   applicationShellWidgetClass,
                                   FRAME_X_DISPLAY (f), al, ac);
 
-  f->display.x->widget = shell_widget;
+  f->output_data.x->widget = shell_widget;
   /* maybe_set_screen_title_format (shell_widget); */
 
   pane_widget = lw_create_widget ("main", "pane", widget_id_tick++,
@@ -2482,7 +2482,7 @@ x_window (f, window_prompting, minibuffer_only)
                                  (lw_callback) NULL,
                                  (lw_callback) NULL);
 
-  f->display.x->column_widget = pane_widget;
+  f->output_data.x->column_widget = pane_widget;
 
   /* mappedWhenManaged to false tells to the paned window to not map/unmap 
      the emacs screen when changing menubar.  This reduces flickering.  */
@@ -2497,7 +2497,7 @@ x_window (f, window_prompting, minibuffer_only)
                                  emacsFrameClass,
                                  pane_widget, al, ac);
  
-  f->display.x->edit_widget = frame_widget;
+  f->output_data.x->edit_widget = frame_widget;
  
   XtManageChild (frame_widget); 
 
@@ -2509,9 +2509,9 @@ x_window (f, window_prompting, minibuffer_only)
     int ac = 0;
     int extra_borders = 0;
     int menubar_size 
-      = (f->display.x->menubar_widget
-        ? (f->display.x->menubar_widget->core.height
-           + f->display.x->menubar_widget->core.border_width)
+      = (f->output_data.x->menubar_widget
+        ? (f->output_data.x->menubar_widget->core.height
+           + f->output_data.x->menubar_widget->core.border_width)
         : 0);
     extern char *lwlib_toolkit_type;
 
@@ -2522,13 +2522,13 @@ x_window (f, window_prompting, minibuffer_only)
         menubar_size += ibw;
       }
 
-    f->display.x->menubar_height = menubar_size;
+    f->output_data.x->menubar_height = menubar_size;
 
     /* Motif seems to need this amount added to the sizes
        specified for the shell widget.  The Athena/Lucid widgets don't.
        Both conclusions reached experimentally.  -- rms.  */
     if (!strcmp (lwlib_toolkit_type, "motif"))
-      XtVaGetValues (f->display.x->edit_widget, XtNinternalBorderWidth,
+      XtVaGetValues (f->output_data.x->edit_widget, XtNinternalBorderWidth,
                     &extra_borders, NULL);
 
     /* Convert our geometry parameters into a geometry string
@@ -2537,9 +2537,9 @@ x_window (f, window_prompting, minibuffer_only)
        is a user-specified or program-specified one.
        We pass that information later, in x_wm_set_size_hints.  */
     {
-      int left = f->display.x->left_pos;
+      int left = f->output_data.x->left_pos;
       int xneg = window_prompting & XNegative;
-      int top = f->display.x->top_pos;
+      int top = f->output_data.x->top_pos;
       int yneg = window_prompting & YNegative;
       if (xneg)
        left = -left;
@@ -2576,10 +2576,10 @@ x_window (f, window_prompting, minibuffer_only)
   class_hints.res_class = EMACS_CLASS;
   XSetClassHint (FRAME_X_DISPLAY (f), XtWindow (shell_widget), &class_hints);
 
-  f->display.x->wm_hints.input = True;
-  f->display.x->wm_hints.flags |= InputHint;
+  f->output_data.x->wm_hints.input = True;
+  f->output_data.x->wm_hints.flags |= InputHint;
   XSetWMHints (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-              &f->display.x->wm_hints);
+              &f->output_data.x->wm_hints);
 
   hack_wm_protocols (f, shell_widget);
 
@@ -2619,13 +2619,13 @@ x_window (f, window_prompting, minibuffer_only)
   }
 
   XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                f->display.x->text_cursor);
+                f->output_data.x->text_cursor);
 
   UNBLOCK_INPUT;
 
   if (!minibuffer_only && FRAME_EXTERNAL_MENU_BAR (f))
     initialize_frame_menubar (f);
-  lw_set_main_areas (pane_widget, f->display.x->menubar_widget, frame_widget);
+  lw_set_main_areas (pane_widget, f->output_data.x->menubar_widget, frame_widget);
 
   if (FRAME_X_WINDOW (f) == 0)
     error ("Unable to create window");
@@ -2643,8 +2643,8 @@ x_window (f)
   XSetWindowAttributes attributes;
   unsigned long attribute_mask;
 
-  attributes.background_pixel = f->display.x->background_pixel;
-  attributes.border_pixel = f->display.x->border_pixel;
+  attributes.background_pixel = f->output_data.x->background_pixel;
+  attributes.border_pixel = f->output_data.x->border_pixel;
   attributes.bit_gravity = StaticGravity;
   attributes.backing_store = NotUseful;
   attributes.save_under = True;
@@ -2658,11 +2658,11 @@ x_window (f)
   BLOCK_INPUT;
   FRAME_X_WINDOW (f)
     = XCreateWindow (FRAME_X_DISPLAY (f),
-                    f->display.x->parent_desc,
-                    f->display.x->left_pos,
-                    f->display.x->top_pos,
+                    f->output_data.x->parent_desc,
+                    f->output_data.x->left_pos,
+                    f->output_data.x->top_pos,
                     PIXEL_WIDTH (f), PIXEL_HEIGHT (f),
-                    f->display.x->border_width,
+                    f->output_data.x->border_width,
                     CopyFromParent, /* depth */
                     InputOutput, /* class */
                     FRAME_X_DISPLAY_INFO (f)->visual,
@@ -2676,17 +2676,17 @@ x_window (f)
 
   /* The menubar is part of the ordinary display;
      it does not count in addition to the height of the window.  */
-  f->display.x->menubar_height = 0;
+  f->output_data.x->menubar_height = 0;
 
   /* This indicates that we use the "Passive Input" input model.
      Unless we do this, we don't get the Focus{In,Out} events that we
      need to draw the cursor correctly.  Accursed bureaucrats.
    XWhipsAndChains (FRAME_X_DISPLAY (f), IronMaiden, &TheRack);  */
 
-  f->display.x->wm_hints.input = True;
-  f->display.x->wm_hints.flags |= InputHint;
+  f->output_data.x->wm_hints.input = True;
+  f->output_data.x->wm_hints.flags |= InputHint;
   XSetWMHints (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-              &f->display.x->wm_hints);
+              &f->output_data.x->wm_hints);
 
   /* Request "save yourself" and "delete window" commands from wm.  */
   {
@@ -2711,7 +2711,7 @@ x_window (f)
   }
 
   XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                f->display.x->text_cursor);
+                f->output_data.x->text_cursor);
 
   UNBLOCK_INPUT;
 
@@ -2788,34 +2788,34 @@ x_make_gc (f)
      Note that many default values are used.  */
 
   /* Normal video */
-  gc_values.font = f->display.x->font->fid;
-  gc_values.foreground = f->display.x->foreground_pixel;
-  gc_values.background = f->display.x->background_pixel;
+  gc_values.font = f->output_data.x->font->fid;
+  gc_values.foreground = f->output_data.x->foreground_pixel;
+  gc_values.background = f->output_data.x->background_pixel;
   gc_values.line_width = 0;    /* Means 1 using fast algorithm.  */
-  f->display.x->normal_gc = XCreateGC (FRAME_X_DISPLAY (f),
+  f->output_data.x->normal_gc = XCreateGC (FRAME_X_DISPLAY (f),
                                       FRAME_X_WINDOW (f),
                                       GCLineWidth | GCFont
                                       | GCForeground | GCBackground,
                                       &gc_values);
 
   /* Reverse video style.  */
-  gc_values.foreground = f->display.x->background_pixel;
-  gc_values.background = f->display.x->foreground_pixel;
-  f->display.x->reverse_gc = XCreateGC (FRAME_X_DISPLAY (f),
+  gc_values.foreground = f->output_data.x->background_pixel;
+  gc_values.background = f->output_data.x->foreground_pixel;
+  f->output_data.x->reverse_gc = XCreateGC (FRAME_X_DISPLAY (f),
                                        FRAME_X_WINDOW (f),
                                        GCFont | GCForeground | GCBackground
                                        | GCLineWidth,
                                        &gc_values);
 
   /* Cursor has cursor-color background, background-color foreground.  */
-  gc_values.foreground = f->display.x->background_pixel;
-  gc_values.background = f->display.x->cursor_pixel;
+  gc_values.foreground = f->output_data.x->background_pixel;
+  gc_values.background = f->output_data.x->cursor_pixel;
   gc_values.fill_style = FillOpaqueStippled;
   gc_values.stipple
     = XCreateBitmapFromData (FRAME_X_DISPLAY (f),
                             FRAME_X_DISPLAY_INFO (f)->root_window,
                             cursor_bits, 16, 16);
-  f->display.x->cursor_gc
+  f->output_data.x->cursor_gc
     = XCreateGC (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                 (GCFont | GCForeground | GCBackground
                  | GCFillStyle | GCStipple | GCLineWidth),
@@ -2824,12 +2824,12 @@ x_make_gc (f)
   /* Create the gray border tile used when the pointer is not in
      the frame.  Since this depends on the frame's pixel values,
      this must be done on a per-frame basis.  */
-  f->display.x->border_tile
+  f->output_data.x->border_tile
     = (XCreatePixmapFromBitmapData
        (FRAME_X_DISPLAY (f), FRAME_X_DISPLAY_INFO (f)->root_window, 
        gray_bits, gray_width, gray_height,
-       f->display.x->foreground_pixel,
-       f->display.x->background_pixel,
+       f->output_data.x->foreground_pixel,
+       f->output_data.x->background_pixel,
        DefaultDepth (FRAME_X_DISPLAY (f),
                      XScreenNumberOfScreen (FRAME_X_SCREEN (f)))));
 
@@ -2915,9 +2915,9 @@ This function is an internal primitive--use `make-frame' instead.")
   GCPRO1 (frame);
 
   f->output_method = output_x_window;
-  f->display.x = (struct x_display *) xmalloc (sizeof (struct x_display));
-  bzero (f->display.x, sizeof (struct x_display));
-  f->display.x->icon_bitmap = -1;
+  f->output_data.x = (struct x_output *) xmalloc (sizeof (struct x_output));
+  bzero (f->output_data.x, sizeof (struct x_output));
+  f->output_data.x->icon_bitmap = -1;
 
   f->icon_name
     = x_get_arg (parms, Qicon_name, "iconName", "Title", string);
@@ -2933,13 +2933,13 @@ This function is an internal primitive--use `make-frame' instead.")
 
   if (!NILP (parent))
     {
-      f->display.x->parent_desc = parent;
-      f->display.x->explicit_parent = 1;
+      f->output_data.x->parent_desc = parent;
+      f->output_data.x->explicit_parent = 1;
     }
   else
     {
-      f->display.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
-      f->display.x->explicit_parent = 0;
+      f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
+      f->output_data.x->explicit_parent = 0;
     }
 
   /* Note that the frame has no physical cursor right now.  */
@@ -2993,7 +2993,7 @@ This function is an internal primitive--use `make-frame' instead.")
 #ifdef USE_X_TOOLKIT
   /* Prevent lwlib/xlwmenu.c from crashing because of a bug
      whereby it fails to get any font.  */
-  xlwmenu_default_font = f->display.x->font;
+  xlwmenu_default_font = f->output_data.x->font;
 #endif
 
   x_default_parameter (f, parms, Qborder_width, make_number (2),
@@ -3033,25 +3033,25 @@ This function is an internal primitive--use `make-frame' instead.")
   x_default_parameter (f, parms, Qscroll_bar_width, Qnil,
                       "scrollBarWidth", "ScrollBarWidth", number);
 
-  f->display.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
+  f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
   window_prompting = x_figure_window_size (f, parms);
 
   if (window_prompting & XNegative)
     {
       if (window_prompting & YNegative)
-       f->display.x->win_gravity = SouthEastGravity;
+       f->output_data.x->win_gravity = SouthEastGravity;
       else
-       f->display.x->win_gravity = NorthEastGravity;
+       f->output_data.x->win_gravity = NorthEastGravity;
     }
   else
     {
       if (window_prompting & YNegative)
-       f->display.x->win_gravity = SouthWestGravity;
+       f->output_data.x->win_gravity = SouthWestGravity;
       else
-       f->display.x->win_gravity = NorthWestGravity;
+       f->output_data.x->win_gravity = NorthWestGravity;
     }
 
-  f->display.x->size_hint_flags = window_prompting;
+  f->output_data.x->size_hint_flags = window_prompting;
 
 #ifdef USE_X_TOOLKIT
   x_window (f, window_prompting, minibuffer_only);
@@ -3106,7 +3106,7 @@ This function is an internal primitive--use `make-frame' instead.")
   /* Make the window appear on the frame and enable display,
      unless the caller says not to.  However, with explicit parent,
      Emacs cannot control visibility, so don't try.  */
-  if (! f->display.x->explicit_parent)
+  if (! f->output_data.x->explicit_parent)
     {
       Lisp_Object visibility;
 
@@ -3230,12 +3230,12 @@ even if they match PATTERN and FACE.")
 
       if (face_id < 0 || face_id >= FRAME_N_PARAM_FACES (f)
          || FRAME_PARAM_FACES (f) [face_id] == 0)
-       size_ref = f->display.x->font;
+       size_ref = f->output_data.x->font;
       else
        {
          size_ref = FRAME_PARAM_FACES (f) [face_id]->font;
          if (size_ref == (XFontStruct *) (~0))
-           size_ref = f->display.x->font;
+           size_ref = f->output_data.x->font;
        }
     }
 
@@ -3687,14 +3687,14 @@ int
 x_char_width (f)
      register struct frame *f;
 {
-  return FONT_WIDTH (f->display.x->font);
+  return FONT_WIDTH (f->output_data.x->font);
 }
 
 int
 x_char_height (f)
      register struct frame *f;
 {
-  return f->display.x->line_height;
+  return f->output_data.x->line_height;
 }
 
 int
@@ -3718,19 +3718,19 @@ x_rectangle (f, gc, left_char, top_char, chars, lines)
 {
   int width;
   int height;
-  int left = (left_char * FONT_WIDTH (f->display.x->font)
-                   + f->display.x->internal_border_width);
-  int top = (top_char * f->display.x->line_height
-                  + f->display.x->internal_border_width);
+  int left = (left_char * FONT_WIDTH (f->output_data.x->font)
+                   + f->output_data.x->internal_border_width);
+  int top = (top_char * f->output_data.x->line_height
+                  + f->output_data.x->internal_border_width);
 
   if (chars < 0)
-    width = FONT_WIDTH (f->display.x->font) / 2;
+    width = FONT_WIDTH (f->output_data.x->font) / 2;
   else
-    width = FONT_WIDTH (f->display.x->font) * chars;
+    width = FONT_WIDTH (f->output_data.x->font) * chars;
   if (lines < 0)
-    height = f->display.x->line_height / 2;
+    height = f->output_data.x->line_height / 2;
   else
-    height = f->display.x->line_height * lines;
+    height = f->output_data.x->line_height * lines;
 
   XDrawRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                  gc, left, top, width, height);
@@ -3778,7 +3778,7 @@ numbers X0, Y0, X1, Y1 in the cursor pixel.")
     }
 
   BLOCK_INPUT;
-  x_rectangle (XFRAME (frame), XFRAME (frame)->display.x->cursor_gc,
+  x_rectangle (XFRAME (frame), XFRAME (frame)->output_data.x->cursor_gc,
               left, top, n_chars, n_lines);
   UNBLOCK_INPUT;
 
@@ -3827,7 +3827,7 @@ X0, Y0, X1, Y1 in the regular background-pixel.")
     }
 
   BLOCK_INPUT;
-  x_rectangle (XFRAME (frame), XFRAME (frame)->display.x->reverse_gc,
+  x_rectangle (XFRAME (frame), XFRAME (frame)->output_data.x->reverse_gc,
               left, top, n_chars, n_lines);
   UNBLOCK_INPUT;
 
@@ -3846,9 +3846,9 @@ outline_region (f, gc, top_x, top_y, bottom_x, bottom_y)
      GC gc;
      int  top_x, top_y, bottom_x, bottom_y;
 {
-  register int ibw = f->display.x->internal_border_width;
-  register int font_w = FONT_WIDTH (f->display.x->font);
-  register int font_h = f->display.x->line_height;
+  register int ibw = f->output_data.x->internal_border_width;
+  register int font_w = FONT_WIDTH (f->output_data.x->font);
+  register int font_h = f->output_data.x->line_height;
   int y = top_y;
   int x = line_len (y);
   XPoint *pixel_points
@@ -3941,18 +3941,18 @@ selected frame.")
   y1 = f->cursor_y;
 
   if (y1 > y0)                 /* point below mouse */
-    outline_region (f, f->display.x->cursor_gc,
+    outline_region (f, f->output_data.x->cursor_gc,
                    x0, y0, x1, y1);
   else if (y1 < y0)            /* point above mouse */
-    outline_region (f, f->display.x->cursor_gc,
+    outline_region (f, f->output_data.x->cursor_gc,
                    x1, y1, x0, y0);
   else                         /* same line: draw horizontal rectangle */
     {
       if (x1 > x0)
-       x_rectangle (f, f->display.x->cursor_gc,
+       x_rectangle (f, f->output_data.x->cursor_gc,
                     x0, y0, (x1 - x0 + 1), 1);
       else if (x1 < x0)
-         x_rectangle (f, f->display.x->cursor_gc,
+         x_rectangle (f, f->output_data.x->cursor_gc,
                       x1, y1, (x0 - x1 + 1), 1);
     }
 
@@ -3978,18 +3978,18 @@ at X, Y on the selected frame.")
   y1 = f->cursor_y;
 
   if (y1 > y0)                 /* point below mouse */
-    outline_region (f, f->display.x->reverse_gc,
+    outline_region (f, f->output_data.x->reverse_gc,
                      x0, y0, x1, y1);
   else if (y1 < y0)            /* point above mouse */
-    outline_region (f, f->display.x->reverse_gc,
+    outline_region (f, f->output_data.x->reverse_gc,
                      x1, y1, x0, y0);
   else                         /* same line: draw horizontal rectangle */
     {
       if (x1 > x0)
-       x_rectangle (f, f->display.x->reverse_gc,
+       x_rectangle (f, f->output_data.x->reverse_gc,
                     x0, y0, (x1 - x0 + 1), 1);
       else if (x1 < x0)
-       x_rectangle (f, f->display.x->reverse_gc,
+       x_rectangle (f, f->output_data.x->reverse_gc,
                     x1, y1, (x0 - x1 + 1), 1);
     }
   UNBLOCK_INPUT;
@@ -4090,13 +4090,13 @@ DEFUN ("x-select-region", Fx_select_region, Sx_select_region, 1, 1, "e",
                               && x_contour_x > point_x))
    {
      mouse_below_point = 1;
-     outline_region (f, f->display.x->cursor_gc, point_x, point_y,
+     outline_region (f, f->output_data.x->cursor_gc, point_x, point_y,
                     x_contour_x, x_contour_y);
    }
  else
    {
      mouse_below_point = 0;
-     outline_region (f, f->display.x->cursor_gc, x_contour_x, x_contour_y,
+     outline_region (f, f->output_data.x->cursor_gc, x_contour_x, x_contour_y,
                     point_x, point_y);
    }
 
@@ -4112,9 +4112,9 @@ DEFUN ("x-select-region", Fx_select_region, Sx_select_region, 1, 1, "e",
           {
             mouse_below_point = 0;
 
-            outline_region (f, f->display.x->reverse_gc, point_x, point_y,
+            outline_region (f, f->output_data.x->reverse_gc, point_x, point_y,
                             x_contour_x, x_contour_y);
-            outline_region (f, f->display.x->cursor_gc, x_mouse_x, x_mouse_y,
+            outline_region (f, f->output_data.x->cursor_gc, x_mouse_x, x_mouse_y,
                             point_x, point_y);
           }
         else if (x_mouse_y < x_contour_y)        /* Bottom clipped.  */
@@ -4135,9 +4135,9 @@ DEFUN ("x-select-region", Fx_select_region, Sx_select_region, 1, 1, "e",
           {
             mouse_below_point = 1;
 
-            outline_region (f, f->display.x->reverse_gc,
+            outline_region (f, f->output_data.x->reverse_gc,
                             x_contour_x, x_contour_y, point_x, point_y);
-            outline_region (f, f->display.x->cursor_gc, point_x, point_y,
+            outline_region (f, f->output_data.x->cursor_gc, point_x, point_y,
                             x_mouse_x, x_mouse_y);
           }
         else if (x_mouse_y > x_contour_y)        /* Top clipped.  */
@@ -4177,27 +4177,27 @@ DEFUN ("x-horizontal-line", Fx_horizontal_line, Sx_horizontal_line, 1, 1, "e",
   register Lisp_Object obj;
   struct frame *f = selected_frame;
   register struct window *w = XWINDOW (selected_window);
-  register GC line_gc = f->display.x->cursor_gc;
-  register GC erase_gc = f->display.x->reverse_gc;
+  register GC line_gc = f->output_data.x->cursor_gc;
+  register GC erase_gc = f->output_data.x->reverse_gc;
 #if 0
   char dash_list[] = {6, 4, 6, 4};
   int dashes = 4;
   XGCValues gc_values;
 #endif
   register int previous_y;
-  register int line = (x_mouse_y + 1) * f->display.x->line_height
-    + f->display.x->internal_border_width;
-  register int left = f->display.x->internal_border_width
+  register int line = (x_mouse_y + 1) * f->output_data.x->line_height
+    + f->output_data.x->internal_border_width;
+  register int left = f->output_data.x->internal_border_width
     + (w->left
-       * FONT_WIDTH (f->display.x->font));
+       * FONT_WIDTH (f->output_data.x->font));
   register int right = left + (w->width
-                              * FONT_WIDTH (f->display.x->font))
-    - f->display.x->internal_border_width;
+                              * FONT_WIDTH (f->output_data.x->font))
+    - f->output_data.x->internal_border_width;
 
 #if 0
   BLOCK_INPUT;
-  gc_values.foreground = f->display.x->cursor_pixel;
-  gc_values.background = f->display.x->background_pixel;
+  gc_values.foreground = f->output_data.x->cursor_pixel;
+  gc_values.background = f->output_data.x->background_pixel;
   gc_values.line_width = 1;
   gc_values.line_style = LineOnOffDash;
   gc_values.cap_style = CapRound;
@@ -4208,8 +4208,8 @@ DEFUN ("x-horizontal-line", Fx_horizontal_line, Sx_horizontal_line, 1, 1, "e",
                       | GCLineWidth | GCForeground | GCBackground,
                       &gc_values);
   XSetDashes (FRAME_X_DISPLAY (f), line_gc, 0, dash_list, dashes);
-  gc_values.foreground = f->display.x->background_pixel;
-  gc_values.background = f->display.x->foreground_pixel;
+  gc_values.foreground = f->output_data.x->background_pixel;
+  gc_values.background = f->output_data.x->foreground_pixel;
   erase_gc = XCreateGC (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                       GCLineStyle | GCJoinStyle | GCCapStyle
                       | GCLineWidth | GCForeground | GCBackground,
@@ -4225,8 +4225,8 @@ DEFUN ("x-horizontal-line", Fx_horizontal_line, Sx_horizontal_line, 1, 1, "e",
          && x_mouse_y < XINT (w->top) + XINT (w->height) - 1)
        {
          previous_y = x_mouse_y;
-         line = (x_mouse_y + 1) * f->display.x->line_height
-           + f->display.x->internal_border_width;
+         line = (x_mouse_y + 1) * f->output_data.x->line_height
+           + f->output_data.x->internal_border_width;
          XDrawLine (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                     line_gc, left, line, right, line);
        }
@@ -4279,12 +4279,12 @@ DEFUN ("x-track-pointer", Fx_track_pointer, Sx_track_pointer, 0, 0, 0,
 
   BLOCK_INPUT;
   if (EQ (Vmouse_frame_part, Qtext_part)
-      && (current_pointer_shape != f->display.x->nontext_cursor))
+      && (current_pointer_shape != f->output_data.x->nontext_cursor))
     {
       unsigned char c;
       struct buffer *buf;
 
-      current_pointer_shape = f->display.x->nontext_cursor;
+      current_pointer_shape = f->output_data.x->nontext_cursor;
       XDefineCursor (FRAME_X_DISPLAY (f),
                     FRAME_X_WINDOW (f),
                     current_pointer_shape);
@@ -4293,9 +4293,9 @@ DEFUN ("x-track-pointer", Fx_track_pointer, Sx_track_pointer, 0, 0, 0,
       c = *(BUF_CHAR_ADDRESS (buf, mouse_buffer_offset));
     }
   else if (EQ (Vmouse_frame_part, Qmodeline_part)
-          && (current_pointer_shape != f->display.x->modeline_cursor))
+          && (current_pointer_shape != f->output_data.x->modeline_cursor))
     {
-      current_pointer_shape = f->display.x->modeline_cursor;
+      current_pointer_shape = f->output_data.x->modeline_cursor;
       XDefineCursor (FRAME_X_DISPLAY (f),
                     FRAME_X_WINDOW (f),
                     current_pointer_shape);
@@ -4353,7 +4353,7 @@ DEFUN ("x-track-pointer", Fx_track_pointer, Sx_track_pointer, 1, 1, "e",
          /* Erase previous rectangle.  */
          if (mouse_track_width)
            {
-             x_rectangle (f, f->display.x->reverse_gc,
+             x_rectangle (f, f->output_data.x->reverse_gc,
                           mouse_track_left, mouse_track_top,
                           mouse_track_width, 1);
 
@@ -4433,19 +4433,19 @@ DEFUN ("x-track-pointer", Fx_track_pointer, Sx_track_pointer, 1, 1, "e",
            {
              XDefineCursor (FRAME_X_DISPLAY (f),
                             FRAME_X_WINDOW (f),
-                            f->display.x->text_cursor);
-             x_rectangle (f, f->display.x->cursor_gc,
+                            f->output_data.x->text_cursor);
+             x_rectangle (f, f->output_data.x->cursor_gc,
                           mouse_track_left, mouse_track_top,
                           mouse_track_width, 1);
            }
          else if (in_mode_line)
            XDefineCursor (FRAME_X_DISPLAY (f),
                           FRAME_X_WINDOW (f),
-                          f->display.x->modeline_cursor);
+                          f->output_data.x->modeline_cursor);
          else
            XDefineCursor (FRAME_X_DISPLAY (f),
                           FRAME_X_WINDOW (f),
-                          f->display.x->nontext_cursor);
+                          f->output_data.x->nontext_cursor);
        }
 
       XFlush (FRAME_X_DISPLAY (f));
@@ -4464,7 +4464,7 @@ DEFUN ("x-track-pointer", Fx_track_pointer, Sx_track_pointer, 1, 1, "e",
 
   if (mouse_track_width)
     {
-      x_rectangle (f, f->display.x->reverse_gc,
+      x_rectangle (f, f->output_data.x->reverse_gc,
                   mouse_track_left, mouse_track_top,
                   mouse_track_width, 1);
       mouse_track_width = 0;
@@ -4477,7 +4477,7 @@ DEFUN ("x-track-pointer", Fx_track_pointer, Sx_track_pointer, 1, 1, "e",
     }
   XDefineCursor (FRAME_X_DISPLAY (f),
                 FRAME_X_WINDOW (f),
-                f->display.x->nontext_cursor);
+                f->output_data.x->nontext_cursor);
   XFlush (FRAME_X_DISPLAY (f));
   UNBLOCK_INPUT;
 
@@ -4502,7 +4502,7 @@ x_draw_pixmap (f, x, y, image_data, width, height)
                                 FRAME_X_WINDOW (f), image_data,
                                 width, height);
   XCopyPlane (FRAME_X_DISPLAY (f), image, FRAME_X_WINDOW (f),
-             f->display.x->normal_gc, 0, 0, width, height, x, y);
+             f->output_data.x->normal_gc, 0, 0, width, height, x, y);
 }
 #endif
 \f
index 7821f99..c65ba4a 100644 (file)
@@ -169,7 +169,7 @@ static int next_menubar_widget_id;
 \f
 #ifdef USE_X_TOOLKIT
 
-/* Return the frame whose ->display.x->id equals ID, or 0 if none.  */
+/* Return the frame whose ->output_data.x->id equals ID, or 0 if none.  */
 
 static struct frame *
 menubar_id_to_frame (id)
@@ -186,7 +186,7 @@ menubar_id_to_frame (id)
       f = XFRAME (frame);
       if (f->display.nothing == 1)
        continue;
-      if (f->display.x->id == id)
+      if (f->output_data.x->id == id)
        return f;
     }
   return 0;
@@ -830,8 +830,8 @@ cached information about equivalent key sequences.")
          CHECK_LIVE_WINDOW (window, 0);
          f = XFRAME (WINDOW_FRAME (XWINDOW (window)));
 
-         xpos = (FONT_WIDTH (f->display.x->font) * XWINDOW (window)->left);
-         ypos = (f->display.x->line_height * XWINDOW (window)->top);
+         xpos = (FONT_WIDTH (f->output_data.x->font) * XWINDOW (window)->left);
+         ypos = (f->output_data.x->line_height * XWINDOW (window)->top);
        }
       else
        /* ??? Not really clean; should be CHECK_WINDOW_OR_FRAME,
@@ -1151,17 +1151,17 @@ popup_get_selection (initial_event, dpyinfo, id)
 x_activate_menubar (f)
      FRAME_PTR f;
 {
-  if (f->display.x->saved_button_event->type != ButtonPress)
+  if (f->output_data.x->saved_button_event->type != ButtonPress)
     return;
 
   set_frame_menubar (f, 0, 1);
 
   BLOCK_INPUT;
-  XtDispatchEvent ((XEvent *) f->display.x->saved_button_event);
+  XtDispatchEvent ((XEvent *) f->output_data.x->saved_button_event);
   UNBLOCK_INPUT;
 
   /* Ignore this if we get it a second time.  */
-  f->display.x->saved_button_event->type = 0;
+  f->output_data.x->saved_button_event->type = 0;
 }
 
 /* Detect if a dialog or menu has been posted.  */
@@ -1481,7 +1481,7 @@ static void
 update_frame_menubar (f)
      FRAME_PTR f;
 {
-  struct x_display *x = f->display.x;
+  struct x_output *x = f->output_data.x;
   int columns, rows;
   int menubar_changed;
   
@@ -1543,15 +1543,15 @@ set_frame_menubar (f, first_time, deep_p)
      int first_time;
      int deep_p;
 {
-  Widget menubar_widget = f->display.x->menubar_widget;
+  Widget menubar_widget = f->output_data.x->menubar_widget;
   Lisp_Object tail, items, frame;
   widget_value *wv, *first_wv, *prev_wv = 0;
   int i;
   LWLIB_ID id;
 
-  if (f->display.x->id == 0)
-    f->display.x->id = next_menubar_widget_id++;
-  id = f->display.x->id;
+  if (f->output_data.x->id == 0)
+    f->output_data.x->id = next_menubar_widget_id++;
+  id = f->output_data.x->id;
 
   if (! menubar_widget)
     deep_p = 1;
@@ -1701,42 +1701,42 @@ set_frame_menubar (f, first_time, deep_p)
   if (menubar_widget)
     {
       /* Disable resizing (done for Motif!) */
-      lw_allow_resizing (f->display.x->widget, False);
+      lw_allow_resizing (f->output_data.x->widget, False);
 
       /* The third arg is DEEP_P, which says to consider the entire
         menu trees we supply, rather than just the menu bar item names.  */
       lw_modify_all_widgets (id, first_wv, deep_p);
 
       /* Re-enable the edit widget to resize.  */
-      lw_allow_resizing (f->display.x->widget, True);
+      lw_allow_resizing (f->output_data.x->widget, True);
     }
   else
     {
       menubar_widget = lw_create_widget ("menubar", "menubar", id, first_wv, 
-                                        f->display.x->column_widget,
+                                        f->output_data.x->column_widget,
                                         0,
                                         popup_activate_callback,
                                         menubar_selection_callback,
                                         popup_deactivate_callback);
-      f->display.x->menubar_widget = menubar_widget;
+      f->output_data.x->menubar_widget = menubar_widget;
     }
 
   {
     int menubar_size 
-      = (f->display.x->menubar_widget
-        ? (f->display.x->menubar_widget->core.height
-           + f->display.x->menubar_widget->core.border_width)
+      = (f->output_data.x->menubar_widget
+        ? (f->output_data.x->menubar_widget->core.height
+           + f->output_data.x->menubar_widget->core.border_width)
         : 0);
 
     if (FRAME_EXTERNAL_MENU_BAR (f))
       {
         Dimension ibw = 0;
-        XtVaGetValues (f->display.x->column_widget,
+        XtVaGetValues (f->output_data.x->column_widget,
                       XtNinternalBorderWidth, &ibw, NULL);
         menubar_size += ibw;
       }
 
-    f->display.x->menubar_height = menubar_size;
+    f->output_data.x->menubar_height = menubar_size;
   }
   
   free_menubar_widget_value_tree (first_wv);
@@ -1771,12 +1771,12 @@ free_frame_menubar (f)
   Widget menubar_widget;
   int id;
 
-  menubar_widget = f->display.x->menubar_widget;
+  menubar_widget = f->output_data.x->menubar_widget;
   
   if (menubar_widget)
     {
       BLOCK_INPUT;
-      lw_destroy_all_widgets ((LWLIB_ID) f->display.x->id);
+      lw_destroy_all_widgets ((LWLIB_ID) f->output_data.x->id);
       UNBLOCK_INPUT;
     }
 }
@@ -1989,7 +1989,7 @@ xmenu_show (f, x, y, for_click, keymaps, title, error)
   /* Actually create the menu.  */
   menu_id = widget_id_tick++;
   menu = lw_create_widget ("popup", first_wv->name, menu_id, first_wv,
-                          f->display.x->widget, 1, 0,
+                          f->output_data.x->widget, 1, 0,
                           popup_selection_callback,
                           popup_deactivate_callback);
 
@@ -2210,7 +2210,7 @@ xdialog_show (f, keymaps, title, error)
   /* Actually create the dialog.  */
   dialog_id = widget_id_tick++;
   menu = lw_create_widget (first_wv->name, "dialog", dialog_id, first_wv,
-                          f->display.x->widget, 1, 0,
+                          f->output_data.x->widget, 1, 0,
                           dialog_selection_callback, 0);
   lw_modify_all_widgets (dialog_id, first_wv->contents, True);
   /* Free the widget_value objects we used to specify the contents.  */
@@ -2321,14 +2321,14 @@ xmenu_show (f, x, y, for_click, keymaps, title, error)
 
     /* 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)
       {
        BLOCK_INPUT;
        XTranslateCoordinates (FRAME_X_DISPLAY (f),
 
                               /* From-window, to-window.  */
-                              f->display.x->window_desc,
-                              f->display.x->parent_desc,
+                              f->output_data.x->window_desc,
+                              f->output_data.x->parent_desc,
 
                               /* From-position, to-position.  */
                               0, 0, &win_x, &win_y,
@@ -2343,8 +2343,8 @@ xmenu_show (f, x, y, for_click, keymaps, title, error)
 #endif /* HAVE_X_WINDOWS */
 
   /* Adjust coordinates to be root-window-relative.  */
-  x += f->display.x->left_pos;
-  y += f->display.x->top_pos;
+  x += f->output_data.x->left_pos;
+  y += f->output_data.x->top_pos;
  
   /* Create all the necessary panes and their items.  */
   i = 0;
index 798bde9..4367976 100644 (file)
@@ -581,11 +581,11 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground)
 
            if ((!face->font
                 || face->font == (XFontStruct *) FACE_DEFAULT
-                || face->font == f->display.x->font)
-               && face->background == f->display.x->background_pixel
-               && face->foreground == f->display.x->foreground_pixel)
+                || face->font == f->output_data.x->font)
+               && face->background == f->output_data.x->background_pixel
+               && face->foreground == f->output_data.x->foreground_pixel)
              {
-               gc = f->display.x->cursor_gc;
+               gc = f->output_data.x->cursor_gc;
              }
            /* Cursor on non-default face: must merge.  */
            else
@@ -593,14 +593,14 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground)
                XGCValues xgcv;
                unsigned long mask;
 
-               xgcv.background = f->display.x->cursor_pixel;
+               xgcv.background = f->output_data.x->cursor_pixel;
                xgcv.foreground = face->background;
                /* If the glyph would be invisible,
                   try a different foreground.  */
                if (xgcv.foreground == xgcv.background)
                  xgcv.foreground = face->foreground;
                if (xgcv.foreground == xgcv.background)
-                 xgcv.foreground = f->display.x->cursor_foreground_pixel;
+                 xgcv.foreground = f->output_data.x->cursor_foreground_pixel;
                if (xgcv.foreground == xgcv.background)
                  xgcv.foreground = face->foreground;
                /* Make sure the cursor is distinct from text in this face.  */
@@ -631,7 +631,7 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground)
          }
 
        if (font == (XFontStruct *) FACE_DEFAULT)
-         font = f->display.x->font;
+         font = f->output_data.x->font;
 
        if (just_foreground)
          XDrawString (FRAME_X_DISPLAY (f), window, gc,
@@ -661,13 +661,13 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground)
                                left, top + FONT_BASE (font), buf, len);
 
            /* Clear the rest of the line's height.  */
-           if (f->display.x->line_height != FONT_HEIGHT (font))
+           if (f->output_data.x->line_height != FONT_HEIGHT (font))
              XClearArea (FRAME_X_DISPLAY (f), window, left,
                          top + FONT_HEIGHT (font),
                          FONT_WIDTH (font) * len,
                          /* This is how many pixels of height
                             we have to clear.  */
-                         f->display.x->line_height - FONT_HEIGHT (font),
+                         f->output_data.x->line_height - FONT_HEIGHT (font),
                          False);
          }
 
@@ -722,9 +722,9 @@ dumpglyphs (f, left, top, gp, n, hl, font)
 {
   register int len;
   Window window = FRAME_X_WINDOW (f);
-  GC drawing_gc =   (hl == 2 ? f->display.x->cursor_gc
-                            : (hl ? f->display.x->reverse_gc
-                                  : f->display.x->normal_gc));
+  GC drawing_gc =   (hl == 2 ? f->output_data.x->cursor_gc
+                            : (hl ? f->output_data.x->reverse_gc
+                                  : f->output_data.x->normal_gc));
 
   if (sizeof (GLYPH) == sizeof (XChar2b))
     XDrawImageString16 (FRAME_X_DISPLAY (f), window, drawing_gc,
@@ -827,8 +827,8 @@ XTclear_end_of_line (first_unused)
   XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
              CHAR_TO_PIXEL_COL (f, curs_x),
              CHAR_TO_PIXEL_ROW (f, curs_y),
-             FONT_WIDTH (f->display.x->font) * (first_unused - curs_x),
-             f->display.x->line_height, False);
+             FONT_WIDTH (f->output_data.x->font) * (first_unused - curs_x),
+             f->output_data.x->line_height, False);
 #if 0
   redraw_previous_char (f, curs_x, curs_y, highlight);
 #endif
@@ -894,8 +894,8 @@ redraw_previous_char (f, x, y, highlight_flag)
       XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                  CHAR_TO_PIXEL_COL (f, x - 1),
                  CHAR_TO_PIXEL_ROW (f, y),
-                 FONT_WIDTH (f->display.x->font),
-                 f->display.x->line_height, False);
+                 FONT_WIDTH (f->output_data.x->font),
+                 f->output_data.x->line_height, False);
 
       dumpglyphs (f, CHAR_TO_PIXEL_COL (f, start_x),
                  CHAR_TO_PIXEL_ROW (f, y),
@@ -930,8 +930,8 @@ redraw_following_char (f, x, y, highlight_flag)
       XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                  CHAR_TO_PIXEL_COL (f, x),
                  CHAR_TO_PIXEL_ROW (f, y),
-                 FONT_WIDTH (f->display.x->font),
-                 f->display.x->line_height, False);
+                 FONT_WIDTH (f->output_data.x->font),
+                 f->output_data.x->line_height, False);
 
       dumpglyphs (f, CHAR_TO_PIXEL_COL (f, x),
                  CHAR_TO_PIXEL_ROW (f, y),
@@ -1086,8 +1086,8 @@ XTflash (f)
       XGCValues values;
 
       values.function = GXxor;
-      values.foreground = (f->display.x->foreground_pixel
-                          ^ f->display.x->background_pixel);
+      values.foreground = (f->output_data.x->foreground_pixel
+                          ^ f->output_data.x->background_pixel);
 
       gc = XCreateGC (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                      GCFunction | GCForeground, &values);
@@ -1280,7 +1280,7 @@ do_line_dance ()
     abort ();
 
   ht = f->height;
-  intborder = f->display.x->internal_border_width;
+  intborder = f->output_data.x->internal_border_width;
 
   x_display_cursor (updating_frame, 0);
 
@@ -1291,10 +1291,10 @@ do_line_dance ()
                     && line_dance[j]-j == distance); ++j);
        /* Copy [i,j) upward from [i+distance,j+distance) */
        XCopyArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                  FRAME_X_WINDOW (f), f->display.x->normal_gc,
+                  FRAME_X_WINDOW (f), f->output_data.x->normal_gc,
                   intborder, CHAR_TO_PIXEL_ROW (f, i+distance),
-                  f->width * FONT_WIDTH (f->display.x->font),
-                  (j-i) * f->display.x->line_height,
+                  f->width * FONT_WIDTH (f->output_data.x->font),
+                  (j-i) * f->output_data.x->line_height,
                   intborder, CHAR_TO_PIXEL_ROW (f, i));
        i = j-1;
       }
@@ -1306,10 +1306,10 @@ do_line_dance ()
                     && line_dance[j]-j == distance););
        /* Copy (j,i] downward from (j+distance, i+distance] */
        XCopyArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                  FRAME_X_WINDOW (f), f->display.x->normal_gc,
+                  FRAME_X_WINDOW (f), f->output_data.x->normal_gc,
                   intborder, CHAR_TO_PIXEL_ROW (f, j+1+distance),
-                  f->width * FONT_WIDTH (f->display.x->font),
-                  (i-j) * f->display.x->line_height,
+                  f->width * FONT_WIDTH (f->output_data.x->font),
+                  (i-j) * f->output_data.x->line_height,
                   intborder, CHAR_TO_PIXEL_ROW (f, j+1));
        i = j+1;
       }
@@ -1321,8 +1321,8 @@ do_line_dance ()
        /* Clear [i,j) */
        XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                    intborder, CHAR_TO_PIXEL_ROW (f, i),
-                   f->width * FONT_WIDTH (f->display.x->font),
-                   (j-i) * f->display.x->line_height, False);
+                   f->width * FONT_WIDTH (f->output_data.x->font),
+                   (j-i) * f->output_data.x->line_height, False);
        i = j-1;
       }
   line_dance_in_progress = 0;
@@ -1358,8 +1358,8 @@ dumprectangle (f, left, top, cols, rows)
      Round down for left and top, up for right and bottom.  */
   top  = PIXEL_TO_CHAR_ROW (f, top);
   left = PIXEL_TO_CHAR_COL (f, left);
-  bottom += (f->display.x->line_height - 1);
-  right += (FONT_WIDTH (f->display.x->font) - 1);
+  bottom += (f->output_data.x->line_height - 1);
+  right += (FONT_WIDTH (f->output_data.x->font) - 1);
   bottom = PIXEL_TO_CHAR_ROW (f, bottom);
   right = PIXEL_TO_CHAR_COL (f, right);
 
@@ -1422,7 +1422,7 @@ frame_highlight (f)
      client", so we can always change it to whatever we want.  */
   BLOCK_INPUT;
   XSetWindowBorder (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                   f->display.x->border_pixel);
+                   f->output_data.x->border_pixel);
   UNBLOCK_INPUT;
   x_update_cursor (f, 1);
 }
@@ -1437,7 +1437,7 @@ frame_unhighlight (f)
      client", so we can always change it to whatever we want.  */
   BLOCK_INPUT;
   XSetWindowBorderPixmap (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                         f->display.x->border_tile);
+                         f->output_data.x->border_tile);
   UNBLOCK_INPUT;
   x_update_cursor (f, 1);
 }
@@ -1703,17 +1703,17 @@ pixel_to_glyph_coords (f, pix_x, pix_y, x, y, bounds, noclip)
   /* Arrange for the division in PIXEL_TO_CHAR_COL etc. to round down
      even for negative values.  */
   if (pix_x < 0)
-    pix_x -= FONT_WIDTH ((f)->display.x->font) - 1;
+    pix_x -= FONT_WIDTH ((f)->output_data.x->font) - 1;
   if (pix_y < 0)
-    pix_y -= (f)->display.x->line_height - 1;
+    pix_y -= (f)->output_data.x->line_height - 1;
 
   pix_x = PIXEL_TO_CHAR_COL (f, pix_x);
   pix_y = PIXEL_TO_CHAR_ROW (f, pix_y);
 
   if (bounds)
     {
-      bounds->width  = FONT_WIDTH  (f->display.x->font);
-      bounds->height = f->display.x->line_height;
+      bounds->width  = FONT_WIDTH  (f->output_data.x->font);
+      bounds->height = f->output_data.x->line_height;
       bounds->x = CHAR_TO_PIXEL_COL (f, pix_x);
       bounds->y = CHAR_TO_PIXEL_ROW (f, pix_y);
     }
@@ -2205,10 +2205,10 @@ show_mouse_face (dpyinfo, hl)
   /* Change the mouse cursor according to the value of HL.  */
   if (hl > 0)
     XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                  f->display.x->cross_cursor);
+                  f->output_data.x->cross_cursor);
   else
     XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                  f->display.x->text_cursor);
+                  f->output_data.x->text_cursor);
 }
 
 /* Clear out the mouse-highlighted active region.
@@ -2474,7 +2474,7 @@ x_scroll_bar_create (window, top, left, width, height)
   {
     XSetWindowAttributes a;
     unsigned long mask;
-    a.background_pixel = f->display.x->background_pixel;
+    a.background_pixel = f->output_data.x->background_pixel;
     a.event_mask = (ButtonPressMask | ButtonReleaseMask
                    | ButtonMotionMask | PointerMotionHintMask
                    | ExposureMask);
@@ -2492,7 +2492,7 @@ x_scroll_bar_create (window, top, left, width, height)
     XtSetArg (al[ac], XtNborderWidth, 0); ac++;
     sb_widget = XtCreateManagedWidget ("box",
                                       boxWidgetClass,
-                                      f->display.x->edit_widget, al, ac);
+                                      f->output_data.x->edit_widget, al, ac);
     SET_SCROLL_BAR_X_WINDOW
       (bar, sb_widget->core.window);
 #endif
@@ -2553,7 +2553,7 @@ x_scroll_bar_set_handle (bar, start, end, rebuild)
   int dragging = ! NILP (bar->dragging);
   Window w = SCROLL_BAR_X_WINDOW (bar);
   FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
-  GC gc = f->display.x->normal_gc;
+  GC gc = f->output_data.x->normal_gc;
 
   /* If the display is already accurate, do nothing.  */
   if (! rebuild
@@ -2712,7 +2712,7 @@ XTset_vertical_scroll_bar (window, portion, whole, position)
   int pixel_width
     = (FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0
        ? FRAME_SCROLL_BAR_PIXEL_WIDTH (f)
-       : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->display.x->font)));
+       : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.x->font)));
   int pixel_height = VERTICAL_SCROLL_BAR_PIXEL_HEIGHT (f, height);
 
   struct scroll_bar *bar;
@@ -2863,7 +2863,7 @@ x_scroll_bar_expose (bar, event)
 {
   Window w = SCROLL_BAR_X_WINDOW (bar);
   FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
-  GC gc = f->display.x->normal_gc;
+  GC gc = f->output_data.x->normal_gc;
 
   BLOCK_INPUT;
 
@@ -3405,8 +3405,8 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
 
                    if (f)
                      {
-                       f->display.x->left_pos = new_x;
-                       f->display.x->top_pos = new_y;
+                       f->output_data.x->left_pos = new_x;
+                       f->output_data.x->top_pos = new_y;
                      }
                  }
 #if defined (USE_X_TOOLKIT) && defined (HAVE_X11R5)
@@ -3415,7 +3415,7 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
                  {
                    struct frame *f
                      = x_any_window_to_frame (dpyinfo, event.xclient.window);
-                   _XEditResCheckMessages (f->display.x->widget, NULL,
+                   _XEditResCheckMessages (f->output_data.x->widget, NULL,
                                            &event, NULL);
                  }
 #endif /* USE_X_TOOLKIT and HAVE_X11R5 */
@@ -3494,10 +3494,10 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
              if (f)
                {
                  int x, y;
-                 f->display.x->parent_desc = event.xreparent.parent;
+                 f->output_data.x->parent_desc = event.xreparent.parent;
                  x_real_positions (f, &x, &y);
-                 f->display.x->left_pos = x;
-                 f->display.x->top_pos = y;
+                 f->output_data.x->left_pos = x;
+                 f->output_data.x->top_pos = y;
                }
              break;
 
@@ -3869,7 +3869,7 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
              f = x_any_window_to_frame (dpyinfo, event.xconfigure.window);
              if (f
 #ifdef USE_X_TOOLKIT
-                 && (event.xconfigure.window == XtWindow (f->display.x->widget))
+                 && (event.xconfigure.window == XtWindow (f->output_data.x->widget))
 #endif
                  )
                {
@@ -3886,8 +3886,8 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
                     to check the pixel dimensions as well.  */
                  if (columns != f->width
                      || rows != f->height
-                     || event.xconfigure.width != f->display.x->pixel_width
-                     || event.xconfigure.height != f->display.x->pixel_height)
+                     || event.xconfigure.width != f->output_data.x->pixel_width
+                     || event.xconfigure.height != f->output_data.x->pixel_height)
                    {
                      change_frame_size (f, rows, columns, 0, 1);
                      SET_FRAME_GARBAGED (f);
@@ -3927,18 +3927,18 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
                      event.xconfigure.y = win_y;
                    }
 
-                 f->display.x->pixel_width = event.xconfigure.width;
-                 f->display.x->pixel_height = event.xconfigure.height;
-                 f->display.x->left_pos = event.xconfigure.x;
-                 f->display.x->top_pos = event.xconfigure.y;
+                 f->output_data.x->pixel_width = event.xconfigure.width;
+                 f->output_data.x->pixel_height = event.xconfigure.height;
+                 f->output_data.x->left_pos = event.xconfigure.x;
+                 f->output_data.x->top_pos = event.xconfigure.y;
 
                  /* What we have now is the position of Emacs's own window.
                     Convert that to the position of the window manager window.  */
                  {
                    int x, y;
                    x_real_positions (f, &x, &y);
-                   f->display.x->left_pos = x;
-                   f->display.x->top_pos = y;
+                   f->output_data.x->left_pos = x;
+                   f->output_data.x->top_pos = y;
                    /* Formerly we did not do this in the USE_X_TOOLKIT
                       version.  Let's try making them the same.  */
 /* #ifndef USE_X_TOOLKIT */
@@ -3946,7 +3946,7 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
                      {
                        /* Since the WM decorations come below top_pos now,
                           we must put them below top_pos in the future.  */
-                       f->display.x->win_gravity = NorthWestGravity;
+                       f->output_data.x->win_gravity = NorthWestGravity;
                        x_wm_set_size_hint (f, (long) 0, 0);
                      }
 /* #endif */
@@ -4015,10 +4015,10 @@ XTread_socket (sd, bufp, numchars, waitp, expected)
                   That way, we can run some Lisp code first.  */
                if (f && event.type == ButtonPress)
                  {
-                   if (f->display.x->saved_button_event == 0)
-                     f->display.x->saved_button_event
+                   if (f->output_data.x->saved_button_event == 0)
+                     f->output_data.x->saved_button_event
                        = (XButtonEvent *) xmalloc (sizeof (XButtonEvent)); 
-                   bcopy (&event, f->display.x->saved_button_event,
+                   bcopy (&event, f->output_data.x->saved_button_event,
                           sizeof (XButtonEvent));
                    if (numchars >= 1)
                      {
@@ -4116,11 +4116,11 @@ x_draw_box (f, x, y)
 {
   int left = CHAR_TO_PIXEL_COL (f, x);
   int top  = CHAR_TO_PIXEL_ROW (f, y);
-  int width = FONT_WIDTH (f->display.x->font);
-  int height = f->display.x->line_height;
+  int width = FONT_WIDTH (f->output_data.x->font);
+  int height = f->output_data.x->line_height;
 
   XDrawRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                 f->display.x->cursor_gc,
+                 f->output_data.x->cursor_gc,
                  left, top, width - 1, height - 1);
 }
 
@@ -4182,7 +4182,7 @@ x_display_bar_cursor (f, on, x, y)
       && (!on
          || f->phys_cursor_x != x
          || f->phys_cursor_y != y
-         || f->display.x->current_cursor != bar_cursor))
+         || f->output_data.x->current_cursor != bar_cursor))
     {
       /* Erase the cursor by redrawing the character underneath it.  */
       x_draw_single_glyph (f, f->phys_cursor_y, f->phys_cursor_x,
@@ -4194,7 +4194,7 @@ x_display_bar_cursor (f, on, x, y)
   /* If we now need a cursor in the new place or in the new form, do it so.  */
   if (on
       && (f->phys_cursor_x < 0
-         || (f->display.x->current_cursor != bar_cursor)))
+         || (f->output_data.x->current_cursor != bar_cursor)))
     {
       f->phys_cursor_glyph
        = ((current_glyphs->enable[y]
@@ -4202,16 +4202,16 @@ x_display_bar_cursor (f, on, x, y)
           ? current_glyphs->glyphs[y][x]
           : SPACEGLYPH);
       XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                     f->display.x->cursor_gc,
+                     f->output_data.x->cursor_gc,
                      CHAR_TO_PIXEL_COL (f, x),
                      CHAR_TO_PIXEL_ROW (f, y),
-                     max (f->display.x->cursor_width, 1),
-                     f->display.x->line_height);
+                     max (f->output_data.x->cursor_width, 1),
+                     f->output_data.x->line_height);
 
       f->phys_cursor_x = x;
       f->phys_cursor_y = y;
 
-      f->display.x->current_cursor = bar_cursor;
+      f->output_data.x->current_cursor = bar_cursor;
     }
 
   if (updating_frame != f)
@@ -4248,7 +4248,7 @@ x_display_box_cursor (f, on, x, y)
       && (!on
          || f->phys_cursor_x != x
          || f->phys_cursor_y != y
-         || (f->display.x->current_cursor != hollow_box_cursor
+         || (f->output_data.x->current_cursor != hollow_box_cursor
              && (f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame))))
     {
       int mouse_face_here = 0;
@@ -4273,12 +4273,12 @@ x_display_box_cursor (f, on, x, y)
 
       /* If the font is not as tall as a whole line,
         we must explicitly clear the line's whole height.  */
-      if (FONT_HEIGHT (f->display.x->font) != f->display.x->line_height)
+      if (FONT_HEIGHT (f->output_data.x->font) != f->output_data.x->line_height)
        XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                    CHAR_TO_PIXEL_COL (f, f->phys_cursor_x),
                    CHAR_TO_PIXEL_ROW (f, f->phys_cursor_y),
-                   FONT_WIDTH (f->display.x->font),
-                   f->display.x->line_height, False);
+                   FONT_WIDTH (f->output_data.x->font),
+                   f->output_data.x->line_height, False);
       /* Erase the cursor by redrawing the character underneath it.  */
       x_draw_single_glyph (f, f->phys_cursor_y, f->phys_cursor_x,
                           f->phys_cursor_glyph,
@@ -4293,7 +4293,7 @@ x_display_box_cursor (f, on, x, y)
      write it in the right place.  */
   if (on
       && (f->phys_cursor_x < 0
-         || (f->display.x->current_cursor != filled_box_cursor
+         || (f->output_data.x->current_cursor != filled_box_cursor
              && f == FRAME_X_DISPLAY_INFO (f)->x_highlight_frame)))
     {
       f->phys_cursor_glyph
@@ -4304,13 +4304,13 @@ x_display_box_cursor (f, on, x, y)
       if (f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame)
        {
          x_draw_box (f, x, y);
-         f->display.x->current_cursor = hollow_box_cursor;
+         f->output_data.x->current_cursor = hollow_box_cursor;
        }
       else
        {
          x_draw_single_glyph (f, y, x,
                               f->phys_cursor_glyph, 2);
-         f->display.x->current_cursor = filled_box_cursor;
+         f->output_data.x->current_cursor = filled_box_cursor;
        }
 
       f->phys_cursor_x = x;
@@ -4397,9 +4397,9 @@ x_bitmap_icon (f, file)
     return 1;
 
   /* Free up our existing icon bitmap if any.  */
-  if (f->display.x->icon_bitmap > 0)
-    x_destroy_bitmap (f, f->display.x->icon_bitmap);
-  f->display.x->icon_bitmap = 0;
+  if (f->output_data.x->icon_bitmap > 0)
+    x_destroy_bitmap (f, f->output_data.x->icon_bitmap);
+  f->output_data.x->icon_bitmap = 0;
 
   if (STRINGP (file))
     bitmap_id = x_create_bitmap_from_file (f, file);
@@ -4421,7 +4421,7 @@ x_bitmap_icon (f, file)
     }
 
   x_wm_set_icon_pixmap (f, bitmap_id);
-  f->display.x->icon_bitmap = bitmap_id;
+  f->output_data.x->icon_bitmap = bitmap_id;
 
   return 0;
 }
@@ -4446,7 +4446,7 @@ x_text_icon (f, icon_name)
     text.format = 8;
     text.nitems = strlen (icon_name);
 #ifdef USE_X_TOOLKIT
-    XSetWMIconName (FRAME_X_DISPLAY (f), XtWindow (f->display.x->widget),
+    XSetWMIconName (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget),
                    &text);
 #else /* not USE_X_TOOLKIT */
     XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &text);
@@ -4456,9 +4456,9 @@ x_text_icon (f, icon_name)
   XSetIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), icon_name);
 #endif /* not HAVE_X11R4 */
 
-  if (f->display.x->icon_bitmap > 0)
-    x_destroy_bitmap (f, f->display.x->icon_bitmap);
-  f->display.x->icon_bitmap = 0;
+  if (f->output_data.x->icon_bitmap > 0)
+    x_destroy_bitmap (f, f->output_data.x->icon_bitmap);
+  f->output_data.x->icon_bitmap = 0;
   x_wm_set_icon_pixmap (f, 0);
 
   return 0;
@@ -4729,7 +4729,7 @@ x_new_font (f, fontname)
 
   /* If we have, just return it from the table.  */
   if (already_loaded >= 0)
-    f->display.x->font = FRAME_X_DISPLAY_INFO (f)->font_table[already_loaded].font;
+    f->output_data.x->font = FRAME_X_DISPLAY_INFO (f)->font_table[already_loaded].font;
   /* Otherwise, load the font and add it to the table.  */
   else
     {
@@ -4821,7 +4821,7 @@ x_new_font (f, fontname)
        FRAME_X_DISPLAY_INFO (f)->font_table[n_fonts].full_name = full_name;
       else
        FRAME_X_DISPLAY_INFO (f)->font_table[n_fonts].full_name = FRAME_X_DISPLAY_INFO (f)->font_table[n_fonts].name;
-      f->display.x->font = FRAME_X_DISPLAY_INFO (f)->font_table[n_fonts].font = font;
+      f->output_data.x->font = FRAME_X_DISPLAY_INFO (f)->font_table[n_fonts].font = font;
       FRAME_X_DISPLAY_INFO (f)->n_fonts++;
 
       if (full_name)
@@ -4831,7 +4831,7 @@ x_new_font (f, fontname)
   /* Compute the scroll bar width in character columns.  */
   if (f->scroll_bar_pixel_width > 0)
     {
-      int wid = FONT_WIDTH (f->display.x->font);
+      int wid = FONT_WIDTH (f->output_data.x->font);
       f->scroll_bar_cols = (f->scroll_bar_pixel_width + wid-1) / wid;
     }
   else
@@ -4840,12 +4840,12 @@ x_new_font (f, fontname)
   /* Now make the frame display the given font.  */
   if (FRAME_X_WINDOW (f) != 0)
     {
-      XSetFont (FRAME_X_DISPLAY (f), f->display.x->normal_gc,
-               f->display.x->font->fid);
-      XSetFont (FRAME_X_DISPLAY (f), f->display.x->reverse_gc,
-               f->display.x->font->fid);
-      XSetFont (FRAME_X_DISPLAY (f), f->display.x->cursor_gc,
-               f->display.x->font->fid);
+      XSetFont (FRAME_X_DISPLAY (f), f->output_data.x->normal_gc,
+               f->output_data.x->font->fid);
+      XSetFont (FRAME_X_DISPLAY (f), f->output_data.x->reverse_gc,
+               f->output_data.x->font->fid);
+      XSetFont (FRAME_X_DISPLAY (f), f->output_data.x->cursor_gc,
+               f->output_data.x->font->fid);
 
       frame_update_line_height (f);
       x_set_window_size (f, 0, f->width, f->height);
@@ -4853,7 +4853,7 @@ x_new_font (f, fontname)
   else
     /* If we are setting a new frame's font for the first time,
        there are no faces yet, so this font's height is the line height.  */
-    f->display.x->line_height = FONT_HEIGHT (f->display.x->font);
+    f->output_data.x->line_height = FONT_HEIGHT (f->output_data.x->font);
 
   {
     Lisp_Object lispy_name;
@@ -4873,25 +4873,25 @@ x_calc_absolute_position (f)
 {
   Window win, child;
   int win_x = 0, win_y = 0;
-  int flags = f->display.x->size_hint_flags;
+  int flags = f->output_data.x->size_hint_flags;
   int this_window;
 
 #ifdef USE_X_TOOLKIT
-  this_window = XtWindow (f->display.x->widget);
+  this_window = XtWindow (f->output_data.x->widget);
 #else
   this_window = FRAME_X_WINDOW (f);
 #endif
 
   /* 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)
     {
       BLOCK_INPUT;
       XTranslateCoordinates (FRAME_X_DISPLAY (f),
 
                             /* From-window, to-window.  */
                             this_window,
-                            f->display.x->parent_desc,
+                            f->output_data.x->parent_desc,
 
                             /* From-position, to-position.  */
                             0, 0, &win_x, &win_y,
@@ -4904,22 +4904,22 @@ x_calc_absolute_position (f)
   /* Treat negative positions as relative to the leftmost bottommost
      position that fits on the screen.  */
   if (flags & XNegative)
-    f->display.x->left_pos = (FRAME_X_DISPLAY_INFO (f)->width
-                             - 2 * f->display.x->border_width - win_x
+    f->output_data.x->left_pos = (FRAME_X_DISPLAY_INFO (f)->width
+                             - 2 * f->output_data.x->border_width - win_x
                              - PIXEL_WIDTH (f)
-                             + f->display.x->left_pos);
+                             + f->output_data.x->left_pos);
 
   if (flags & YNegative)
-    f->display.x->top_pos = (FRAME_X_DISPLAY_INFO (f)->height
-                            - 2 * f->display.x->border_width - win_y
+    f->output_data.x->top_pos = (FRAME_X_DISPLAY_INFO (f)->height
+                            - 2 * f->output_data.x->border_width - win_y
                             - PIXEL_HEIGHT (f)
                             - (FRAME_EXTERNAL_MENU_BAR (f)
-                               ? f->display.x->menubar_height : 0)
-                            + f->display.x->top_pos);
+                               ? f->output_data.x->menubar_height : 0)
+                            + f->output_data.x->top_pos);
   /* The left_pos and top_pos
      are now relative to the top and left screen edges,
      so the flags should correspond.  */
-  f->display.x->size_hint_flags &= ~ (XNegative | YNegative);
+  f->output_data.x->size_hint_flags &= ~ (XNegative | YNegative);
 }
 
 /* CHANGE_GRAVITY is 1 when calling from Fset_frame_position,
@@ -4937,14 +4937,14 @@ x_set_offset (f, xoff, yoff, change_gravity)
 
   if (change_gravity > 0)
     {
-      f->display.x->top_pos = yoff;
-      f->display.x->left_pos = xoff;
-      f->display.x->size_hint_flags &= ~ (XNegative | YNegative);
+      f->output_data.x->top_pos = yoff;
+      f->output_data.x->left_pos = xoff;
+      f->output_data.x->size_hint_flags &= ~ (XNegative | YNegative);
       if (xoff < 0)
-       f->display.x->size_hint_flags |= XNegative;
+       f->output_data.x->size_hint_flags |= XNegative;
       if (yoff < 0)
-       f->display.x->size_hint_flags |= YNegative;
-      f->display.x->win_gravity = NorthWestGravity;
+       f->output_data.x->size_hint_flags |= YNegative;
+      f->output_data.x->win_gravity = NorthWestGravity;
     }
   x_calc_absolute_position (f);
 
@@ -4953,16 +4953,16 @@ x_set_offset (f, xoff, yoff, change_gravity)
 
   /* It is a mystery why we need to add the border_width here
      when the frame is already visible, but experiment says we do.  */
-  modified_left = f->display.x->left_pos;
-  modified_top = f->display.x->top_pos;
+  modified_left = f->output_data.x->left_pos;
+  modified_top = f->output_data.x->top_pos;
   if (change_gravity != 0)
     {
-      modified_left += f->display.x->border_width;
-      modified_top += f->display.x->border_width;
+      modified_left += f->output_data.x->border_width;
+      modified_top += f->output_data.x->border_width;
     }
 
 #ifdef USE_X_TOOLKIT
-  XMoveWindow (FRAME_X_DISPLAY (f), XtWindow (f->display.x->widget),
+  XMoveWindow (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget),
               modified_left, modified_top);
 #else /* not USE_X_TOOLKIT */
   XMoveWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
@@ -4991,11 +4991,11 @@ x_set_window_size (f, change_gravity, cols, rows)
        call to XtSetValues within EmacsFrameSetCharSize.
        This is a real kludge, but I don't understand Xt so I can't
        figure out a correct fix.  Can anyone else tell me? -- rms.  */
-    int xpos = f->display.x->widget->core.x;
-    int ypos = f->display.x->widget->core.y;
-    EmacsFrameSetCharSize (f->display.x->edit_widget, cols, rows);
-    f->display.x->widget->core.x = xpos;
-    f->display.x->widget->core.y = ypos;
+    int xpos = f->output_data.x->widget->core.x;
+    int ypos = f->output_data.x->widget->core.y;
+    EmacsFrameSetCharSize (f->output_data.x->edit_widget, cols, rows);
+    f->output_data.x->widget->core.x = xpos;
+    f->output_data.x->widget->core.y = ypos;
   }
   UNBLOCK_INPUT;
 
@@ -5004,16 +5004,16 @@ x_set_window_size (f, change_gravity, cols, rows)
   BLOCK_INPUT;
 
   check_frame_size (f, &rows, &cols);
-  f->display.x->vertical_scroll_bar_extra
+  f->output_data.x->vertical_scroll_bar_extra
     = (!FRAME_HAS_VERTICAL_SCROLL_BARS (f)
        ? 0
        : FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0
        ? FRAME_SCROLL_BAR_PIXEL_WIDTH (f)
-       : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->display.x->font)));
+       : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.x->font)));
   pixelwidth = CHAR_TO_PIXEL_WIDTH (f, cols);
   pixelheight = CHAR_TO_PIXEL_HEIGHT (f, rows);
 
-  f->display.x->win_gravity = NorthWestGravity;
+  f->output_data.x->win_gravity = NorthWestGravity;
   x_wm_set_size_hint (f, (long) 0, 0);
 
   XSync (FRAME_X_DISPLAY (f), False);
@@ -5062,8 +5062,8 @@ x_set_mouse_position (f, x, y)
 {
   int pix_x, pix_y;
 
-  pix_x = CHAR_TO_PIXEL_COL (f, x) + FONT_WIDTH  (f->display.x->font) / 2;
-  pix_y = CHAR_TO_PIXEL_ROW (f, y) + f->display.x->line_height / 2;
+  pix_x = CHAR_TO_PIXEL_COL (f, x) + FONT_WIDTH  (f->output_data.x->font) / 2;
+  pix_y = CHAR_TO_PIXEL_ROW (f, y) + f->output_data.x->line_height / 2;
 
   if (pix_x < 0) pix_x = 0;
   if (pix_x > PIXEL_WIDTH (f)) pix_x = PIXEL_WIDTH (f);
@@ -5129,7 +5129,7 @@ x_raise_frame (f)
     {
       BLOCK_INPUT;
 #ifdef USE_X_TOOLKIT
-      XRaiseWindow (FRAME_X_DISPLAY (f), XtWindow (f->display.x->widget));
+      XRaiseWindow (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget));
 #else /* not USE_X_TOOLKIT */
       XRaiseWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
 #endif /* not USE_X_TOOLKIT */
@@ -5147,7 +5147,7 @@ x_lower_frame (f)
     {
       BLOCK_INPUT;
 #ifdef USE_X_TOOLKIT
-      XLowerWindow (FRAME_X_DISPLAY (f), XtWindow (f->display.x->widget));
+      XLowerWindow (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget));
 #else /* not USE_X_TOOLKIT */
       XLowerWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
 #endif /* not USE_X_TOOLKIT */
@@ -5195,16 +5195,16 @@ x_make_frame_visible (f)
         if we get to x_make_frame_visible a second time
         before the window gets really visible.  */
       if (! FRAME_ICONIFIED_P (f)
-         && ! f->display.x->asked_for_visible)
-       x_set_offset (f, f->display.x->left_pos, f->display.x->top_pos, 0);
+         && ! f->output_data.x->asked_for_visible)
+       x_set_offset (f, f->output_data.x->left_pos, f->output_data.x->top_pos, 0);
 
-      f->display.x->asked_for_visible = 1;
+      f->output_data.x->asked_for_visible = 1;
 
       if (! EQ (Vx_no_window_manager, Qt))
        x_wm_set_window_state (f, NormalState);
 #ifdef USE_X_TOOLKIT
       /* This was XtPopup, but that did nothing for an iconified frame.  */
-      XtMapWidget (f->display.x->widget);
+      XtMapWidget (f->output_data.x->widget);
 #else /* not USE_X_TOOLKIT */
       XMapRaised (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
 #endif /* not USE_X_TOOLKIT */
@@ -5276,7 +5276,7 @@ x_make_frame_invisible (f)
 
 #ifdef USE_X_TOOLKIT
   /* Use the frame's outermost window, not the one we normally draw on.  */
-  window = XtWindow (f->display.x->widget);
+  window = XtWindow (f->output_data.x->widget);
 #else /* not USE_X_TOOLKIT */
   window = FRAME_X_WINDOW (f);
 #endif /* not USE_X_TOOLKIT */
@@ -5377,13 +5377,13 @@ x_iconify_frame (f)
       if (! EQ (Vx_no_window_manager, Qt))
        x_wm_set_window_state (f, IconicState);
       /* This was XtPopup, but that did nothing for an iconified frame.  */
-      XtMapWidget (f->display.x->widget);
+      XtMapWidget (f->output_data.x->widget);
       UNBLOCK_INPUT;
       return;
     }
 
   result = XIconifyWindow (FRAME_X_DISPLAY (f),
-                          XtWindow (f->display.x->widget),
+                          XtWindow (f->output_data.x->widget),
                           DefaultScreen (FRAME_X_DISPLAY (f)));
   UNBLOCK_INPUT;
 
@@ -5400,7 +5400,7 @@ x_iconify_frame (f)
   /* Make sure the X server knows where the window should be positioned,
      in case the user deiconifies with the window manager.  */
   if (! FRAME_VISIBLE_P (f) && !FRAME_ICONIFIED_P (f))
-    x_set_offset (f, f->display.x->left_pos, f->display.x->top_pos, 0);
+    x_set_offset (f, f->output_data.x->left_pos, f->output_data.x->top_pos, 0);
 
   /* Since we don't know which revision of X we're running, we'll use both
      the X11R3 and X11R4 techniques.  I don't know if this is a good idea.  */
@@ -5453,19 +5453,19 @@ x_destroy_window (f)
 
   BLOCK_INPUT;
 
-  if (f->display.x->icon_desc != 0)
-    XDestroyWindow (FRAME_X_DISPLAY (f), f->display.x->icon_desc);
-  XDestroyWindow (FRAME_X_DISPLAY (f), f->display.x->window_desc);
+  if (f->output_data.x->icon_desc != 0)
+    XDestroyWindow (FRAME_X_DISPLAY (f), f->output_data.x->icon_desc);
+  XDestroyWindow (FRAME_X_DISPLAY (f), f->output_data.x->window_desc);
 #ifdef USE_X_TOOLKIT
-  XtDestroyWidget (f->display.x->widget);
+  XtDestroyWidget (f->output_data.x->widget);
   free_frame_menubar (f);
 #endif /* USE_X_TOOLKIT */
 
   free_frame_faces (f);
   XFlush (FRAME_X_DISPLAY (f));
 
-  xfree (f->display.x);
-  f->display.x = 0;
+  xfree (f->output_data.x);
+  f->output_data.x = 0;
   if (f == dpyinfo->x_focus_frame)
     dpyinfo->x_focus_frame = 0;
   if (f == dpyinfo->x_focus_event_frame)
@@ -5506,7 +5506,7 @@ x_wm_set_size_hint (f, flags, user_position)
   Arg al[2];
   int ac = 0;
   Dimension widget_width, widget_height;
-  Window window = XtWindow (f->display.x->widget);
+  Window window = XtWindow (f->output_data.x->widget);
 #else /* not USE_X_TOOLKIT */
   Window window = FRAME_X_WINDOW (f);
 #endif /* not USE_X_TOOLKIT */
@@ -5516,13 +5516,13 @@ x_wm_set_size_hint (f, flags, user_position)
 
   flexlines = f->height;
 
-  size_hints.x = f->display.x->left_pos;
-  size_hints.y = f->display.x->top_pos;
+  size_hints.x = f->output_data.x->left_pos;
+  size_hints.y = f->output_data.x->top_pos;
 
 #ifdef USE_X_TOOLKIT
   XtSetArg (al[ac], XtNwidth, &widget_width); ac++;
   XtSetArg (al[ac], XtNheight, &widget_height); ac++;
-  XtGetValues (f->display.x->widget, al, ac);
+  XtGetValues (f->output_data.x->widget, al, ac);
   size_hints.height = widget_height;
   size_hints.width = widget_width;
 #else /* not USE_X_TOOLKIT */
@@ -5530,8 +5530,8 @@ x_wm_set_size_hint (f, flags, user_position)
   size_hints.width = PIXEL_WIDTH (f);
 #endif /* not USE_X_TOOLKIT */
 
-  size_hints.width_inc = FONT_WIDTH (f->display.x->font);
-  size_hints.height_inc = f->display.x->line_height;
+  size_hints.width_inc = FONT_WIDTH (f->output_data.x->font);
+  size_hints.height_inc = f->output_data.x->line_height;
   size_hints.max_width
     = FRAME_X_DISPLAY_INFO (f)->width - CHAR_TO_PIXEL_WIDTH (f, 0);
   size_hints.max_height
@@ -5620,7 +5620,7 @@ x_wm_set_size_hint (f, flags, user_position)
  no_read:
 
 #ifdef PWinGravity
-  size_hints.win_gravity = f->display.x->win_gravity;
+  size_hints.win_gravity = f->output_data.x->win_gravity;
   size_hints.flags |= PWinGravity;
 
   if (user_position)
@@ -5646,14 +5646,14 @@ x_wm_set_window_state (f, state)
   Arg al[1];
 
   XtSetArg (al[0], XtNinitialState, state);
-  XtSetValues (f->display.x->widget, al, 1);
+  XtSetValues (f->output_data.x->widget, al, 1);
 #else /* not USE_X_TOOLKIT */
   Window window = FRAME_X_WINDOW (f);
 
-  f->display.x->wm_hints.flags |= StateHint;
-  f->display.x->wm_hints.initial_state = state;
+  f->output_data.x->wm_hints.flags |= StateHint;
+  f->output_data.x->wm_hints.initial_state = state;
 
-  XSetWMHints (FRAME_X_DISPLAY (f), window, &f->display.x->wm_hints);
+  XSetWMHints (FRAME_X_DISPLAY (f), window, &f->output_data.x->wm_hints);
 #endif /* not USE_X_TOOLKIT */
 }
 
@@ -5662,7 +5662,7 @@ x_wm_set_icon_pixmap (f, pixmap_id)
      int pixmap_id;
 {
 #ifdef USE_X_TOOLKIT
-  Window window = XtWindow (f->display.x->widget);
+  Window window = XtWindow (f->output_data.x->widget);
 #else
   Window window = FRAME_X_WINDOW (f);
 #endif
@@ -5670,13 +5670,13 @@ x_wm_set_icon_pixmap (f, pixmap_id)
   if (pixmap_id > 0)
     {
       Pixmap icon_pixmap = x_bitmap_pixmap (f, pixmap_id);
-      f->display.x->wm_hints.icon_pixmap = icon_pixmap;
+      f->output_data.x->wm_hints.icon_pixmap = icon_pixmap;
     }
   else
-    f->display.x->wm_hints.icon_pixmap = None;
+    f->output_data.x->wm_hints.icon_pixmap = None;
 
-  f->display.x->wm_hints.flags |= IconPixmapHint;
-  XSetWMHints (FRAME_X_DISPLAY (f), window, &f->display.x->wm_hints);
+  f->output_data.x->wm_hints.flags |= IconPixmapHint;
+  XSetWMHints (FRAME_X_DISPLAY (f), window, &f->output_data.x->wm_hints);
 }
 
 x_wm_set_icon_position (f, icon_x, icon_y)
@@ -5684,16 +5684,16 @@ x_wm_set_icon_position (f, icon_x, icon_y)
      int icon_x, icon_y;
 {
 #ifdef USE_X_TOOLKIT
-  Window window = XtWindow (f->display.x->widget);
+  Window window = XtWindow (f->output_data.x->widget);
 #else
   Window window = FRAME_X_WINDOW (f);
 #endif
 
-  f->display.x->wm_hints.flags |= IconPositionHint;
-  f->display.x->wm_hints.icon_x = icon_x;
-  f->display.x->wm_hints.icon_y = icon_y;
+  f->output_data.x->wm_hints.flags |= IconPositionHint;
+  f->output_data.x->wm_hints.icon_x = icon_x;
+  f->output_data.x->wm_hints.icon_y = icon_y;
 
-  XSetWMHints (FRAME_X_DISPLAY (f), window, &f->display.x->wm_hints);
+  XSetWMHints (FRAME_X_DISPLAY (f), window, &f->output_data.x->wm_hints);
 }
 
 \f