# HG changeset patch # User Richard M. Stallman # Date 843453855 0 # Node ID a02555b4b2b93020c3282b7fd6559389a2f98e0b # Parent 0a31bd9ca4bbeffd683fd0206c88d4f0a174321b (x_scroll_bar_create, x_scroll_bar_move): (x_scroll_bar_expose): Use VERTICAL_SCROLL_BAR_WIDTH_TRIM. (XTchange_line_highlight, dumpglyphs, XTclear_end_of_line) (do_line_dance, pixel_to_glyph_coords): Use FRAME_WINDOW_WIDTH. (x_scroll_bar_move, x_scroll_bar_create): Add a border around the actual window. (x_scroll_bar_expose): Don't trim the width here. diff -r 0a31bd9ca4bb -r a02555b4b2b9 src/xterm.c --- a/src/xterm.c Mon Sep 23 04:40:39 1996 +0000 +++ b/src/xterm.c Mon Sep 23 04:44:15 1996 +0000 @@ -445,7 +445,7 @@ { highlight = new_highlight; XTcursor_to (vpos, 0); - XTclear_end_of_line (updating_frame->width); + XTclear_end_of_line (FRAME_WINDOW_WIDTH (updating_frame)); } /* This is used when starting Emacs and when restarting after suspend. @@ -519,7 +519,7 @@ int just_foreground; { /* Holds characters to be displayed. */ - char *buf = (char *) alloca (f->width * sizeof (*buf)); + char *buf = (char *) alloca (FRAME_WINDOW_WIDTH (f) * sizeof (*buf)); register char *cp; /* Steps through buf[]. */ register int tlen = GLYPH_TABLE_LENGTH; register Lisp_Object *tbase = GLYPH_TABLE_BASE; @@ -832,8 +832,8 @@ if (first_unused <= 0) return; - if (first_unused >= f->width) - first_unused = f->width; + if (first_unused >= FRAME_WINDOW_WIDTH (f)) + first_unused = FRAME_WINDOW_WIDTH (f); first_unused += FRAME_LEFT_SCROLL_BAR_WIDTH (f); @@ -1316,7 +1316,7 @@ XCopyArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), FRAME_X_WINDOW (f), f->output_data.x->normal_gc, intborder, CHAR_TO_PIXEL_ROW (f, i+distance), - f->width * FONT_WIDTH (f->output_data.x->font), + FRAME_WINDOW_WIDTH (f) * 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; @@ -1331,7 +1331,7 @@ XCopyArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), FRAME_X_WINDOW (f), f->output_data.x->normal_gc, intborder, CHAR_TO_PIXEL_ROW (f, j+1+distance), - f->width * FONT_WIDTH (f->output_data.x->font), + FRAME_WINDOW_WIDTH (f) * 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; @@ -1344,7 +1344,7 @@ /* Clear [i,j) */ XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), intborder, CHAR_TO_PIXEL_ROW (f, i), - f->width * FONT_WIDTH (f->output_data.x->font), + FRAME_WINDOW_WIDTH (f) * FONT_WIDTH (f->output_data.x->font), (j-i) * f->output_data.x->line_height, False); i = j-1; } @@ -1745,8 +1745,8 @@ { if (pix_x < 0) pix_x = 0; - else if (pix_x > f->width) - pix_x = f->width; + else if (pix_x > FRAME_WINDOW_WIDTH (f)) + pix_x = FRAME_WINDOW_WIDTH (f); if (pix_y < 0) pix_y = 0; @@ -2477,7 +2477,8 @@ XCreateWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), /* Position and size of scroll bar. */ - left, top, width, height, + left + VERTICAL_SCROLL_BAR_WIDTH_TRIM, top, + width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2, height, /* Border width, depth, class, and visual. */ 0, CopyFromParent, CopyFromParent, CopyFromParent, @@ -2626,9 +2627,10 @@ XWindowChanges wc; unsigned int mask = 0; - wc.x = left; + wc.x = left + VERTICAL_SCROLL_BAR_WIDTH_TRIM; wc.y = top; - wc.width = width; + + wc.width = width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2; wc.height = height; if (left != XINT (bar->left)) mask |= CWX; @@ -2843,9 +2845,7 @@ Window w = SCROLL_BAR_X_WINDOW (bar); FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); GC gc = f->output_data.x->normal_gc; - int width_trim = (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f) - ? LEFT_VERTICAL_SCROLL_BAR_WIDTH_TRIM - : 0); + int width_trim = VERTICAL_SCROLL_BAR_WIDTH_TRIM; BLOCK_INPUT; @@ -2856,7 +2856,7 @@ /* x, y, width, height */ 0, 0, - XINT (bar->width) - 1 - width_trim, + XINT (bar->width) - 1 - width_trim - width_trim, XINT (bar->height) - 1); UNBLOCK_INPUT;