Mercurial > emacs
diff src/xterm.c @ 12667:a3466dad7d6d
Renamings: frame->display => frame->output, struct x_display -> sruct x_output.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 25 Jul 1995 21:55:50 +0000 |
parents | 05b7a5d25df6 |
children | 7e5276da6270 |
line wrap: on
line diff
--- a/src/xterm.c Tue Jul 25 21:20:18 1995 +0000 +++ b/src/xterm.c Tue Jul 25 21:55:50 1995 +0000 @@ -581,11 +581,11 @@ 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 @@ 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 @@ } 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 @@ 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 @@ { 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ && 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 @@ && 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 @@ /* 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 @@ 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 @@ 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 @@ 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 @@ /* 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 @@ /* 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 @@ { 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 @@ 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 @@ 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 @@ 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 @@ { 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 @@ 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 @@ { 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ { /* 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 @@ 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 @@ { 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 @@ && (!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 @@ /* 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 @@ ? 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 @@ && (!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 @@ /* 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 @@ 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 @@ 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 @@ 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_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 @@ 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 @@ 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 @@ /* 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 @@ 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 @@ /* 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 @@ /* 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 @@ 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 @@ { 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 @@ /* 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 @@ 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 @@ /* 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 @@ 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 @@ 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 @@ { 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 @@ { 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 @@ { 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 @@ 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->display.x->asked_for_visible = 1; + && ! 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->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 @@ #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 @@ 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 @@ /* 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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; - - XSetWMHints (FRAME_X_DISPLAY (f), window, &f->display.x->wm_hints); + f->output_data.x->wm_hints.flags |= StateHint; + f->output_data.x->wm_hints.initial_state = state; + + XSetWMHints (FRAME_X_DISPLAY (f), window, &f->output_data.x->wm_hints); #endif /* not USE_X_TOOLKIT */ } @@ -5662,7 +5662,7 @@ 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 @@ 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->display.x->wm_hints.flags |= IconPixmapHint; - XSetWMHints (FRAME_X_DISPLAY (f), window, &f->display.x->wm_hints); + f->output_data.x->wm_hints.icon_pixmap = None; + + 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 @@ 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; - - XSetWMHints (FRAME_X_DISPLAY (f), window, &f->display.x->wm_hints); + 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->output_data.x->wm_hints); }