diff options
| author | Richard M. Stallman | 1996-09-23 04:44:15 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-09-23 04:44:15 +0000 |
| commit | 3cbd2e0ba0aa8b0f60df09b87695ababeae610c0 (patch) | |
| tree | 3bf8d2d11f9d7e82c249b8af5aaea3a95ae9a23a /src | |
| parent | de42d728f6004f829cdc040cd3b3ab4e292644dd (diff) | |
| download | emacs-3cbd2e0ba0aa8b0f60df09b87695ababeae610c0.tar.gz emacs-3cbd2e0ba0aa8b0f60df09b87695ababeae610c0.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/xterm.c b/src/xterm.c index 99a302b6f72..64578891a6d 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -445,7 +445,7 @@ XTchange_line_highlight (new_highlight, vpos, first_unused_hpos) | |||
| 445 | { | 445 | { |
| 446 | highlight = new_highlight; | 446 | highlight = new_highlight; |
| 447 | XTcursor_to (vpos, 0); | 447 | XTcursor_to (vpos, 0); |
| 448 | XTclear_end_of_line (updating_frame->width); | 448 | XTclear_end_of_line (FRAME_WINDOW_WIDTH (updating_frame)); |
| 449 | } | 449 | } |
| 450 | 450 | ||
| 451 | /* This is used when starting Emacs and when restarting after suspend. | 451 | /* This is used when starting Emacs and when restarting after suspend. |
| @@ -519,7 +519,7 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground) | |||
| 519 | int just_foreground; | 519 | int just_foreground; |
| 520 | { | 520 | { |
| 521 | /* Holds characters to be displayed. */ | 521 | /* Holds characters to be displayed. */ |
| 522 | char *buf = (char *) alloca (f->width * sizeof (*buf)); | 522 | char *buf = (char *) alloca (FRAME_WINDOW_WIDTH (f) * sizeof (*buf)); |
| 523 | register char *cp; /* Steps through buf[]. */ | 523 | register char *cp; /* Steps through buf[]. */ |
| 524 | register int tlen = GLYPH_TABLE_LENGTH; | 524 | register int tlen = GLYPH_TABLE_LENGTH; |
| 525 | register Lisp_Object *tbase = GLYPH_TABLE_BASE; | 525 | register Lisp_Object *tbase = GLYPH_TABLE_BASE; |
| @@ -832,8 +832,8 @@ XTclear_end_of_line (first_unused) | |||
| 832 | if (first_unused <= 0) | 832 | if (first_unused <= 0) |
| 833 | return; | 833 | return; |
| 834 | 834 | ||
| 835 | if (first_unused >= f->width) | 835 | if (first_unused >= FRAME_WINDOW_WIDTH (f)) |
| 836 | first_unused = f->width; | 836 | first_unused = FRAME_WINDOW_WIDTH (f); |
| 837 | 837 | ||
| 838 | first_unused += FRAME_LEFT_SCROLL_BAR_WIDTH (f); | 838 | first_unused += FRAME_LEFT_SCROLL_BAR_WIDTH (f); |
| 839 | 839 | ||
| @@ -1316,7 +1316,7 @@ do_line_dance () | |||
| 1316 | XCopyArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | 1316 | XCopyArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), |
| 1317 | FRAME_X_WINDOW (f), f->output_data.x->normal_gc, | 1317 | FRAME_X_WINDOW (f), f->output_data.x->normal_gc, |
| 1318 | intborder, CHAR_TO_PIXEL_ROW (f, i+distance), | 1318 | intborder, CHAR_TO_PIXEL_ROW (f, i+distance), |
| 1319 | f->width * FONT_WIDTH (f->output_data.x->font), | 1319 | FRAME_WINDOW_WIDTH (f) * FONT_WIDTH (f->output_data.x->font), |
| 1320 | (j-i) * f->output_data.x->line_height, | 1320 | (j-i) * f->output_data.x->line_height, |
| 1321 | intborder, CHAR_TO_PIXEL_ROW (f, i)); | 1321 | intborder, CHAR_TO_PIXEL_ROW (f, i)); |
| 1322 | i = j-1; | 1322 | i = j-1; |
| @@ -1331,7 +1331,7 @@ do_line_dance () | |||
| 1331 | XCopyArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | 1331 | XCopyArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), |
| 1332 | FRAME_X_WINDOW (f), f->output_data.x->normal_gc, | 1332 | FRAME_X_WINDOW (f), f->output_data.x->normal_gc, |
| 1333 | intborder, CHAR_TO_PIXEL_ROW (f, j+1+distance), | 1333 | intborder, CHAR_TO_PIXEL_ROW (f, j+1+distance), |
| 1334 | f->width * FONT_WIDTH (f->output_data.x->font), | 1334 | FRAME_WINDOW_WIDTH (f) * FONT_WIDTH (f->output_data.x->font), |
| 1335 | (i-j) * f->output_data.x->line_height, | 1335 | (i-j) * f->output_data.x->line_height, |
| 1336 | intborder, CHAR_TO_PIXEL_ROW (f, j+1)); | 1336 | intborder, CHAR_TO_PIXEL_ROW (f, j+1)); |
| 1337 | i = j+1; | 1337 | i = j+1; |
| @@ -1344,7 +1344,7 @@ do_line_dance () | |||
| 1344 | /* Clear [i,j) */ | 1344 | /* Clear [i,j) */ |
| 1345 | XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | 1345 | XClearArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), |
| 1346 | intborder, CHAR_TO_PIXEL_ROW (f, i), | 1346 | intborder, CHAR_TO_PIXEL_ROW (f, i), |
| 1347 | f->width * FONT_WIDTH (f->output_data.x->font), | 1347 | FRAME_WINDOW_WIDTH (f) * FONT_WIDTH (f->output_data.x->font), |
| 1348 | (j-i) * f->output_data.x->line_height, False); | 1348 | (j-i) * f->output_data.x->line_height, False); |
| 1349 | i = j-1; | 1349 | i = j-1; |
| 1350 | } | 1350 | } |
| @@ -1745,8 +1745,8 @@ pixel_to_glyph_coords (f, pix_x, pix_y, x, y, bounds, noclip) | |||
| 1745 | { | 1745 | { |
| 1746 | if (pix_x < 0) | 1746 | if (pix_x < 0) |
| 1747 | pix_x = 0; | 1747 | pix_x = 0; |
| 1748 | else if (pix_x > f->width) | 1748 | else if (pix_x > FRAME_WINDOW_WIDTH (f)) |
| 1749 | pix_x = f->width; | 1749 | pix_x = FRAME_WINDOW_WIDTH (f); |
| 1750 | 1750 | ||
| 1751 | if (pix_y < 0) | 1751 | if (pix_y < 0) |
| 1752 | pix_y = 0; | 1752 | pix_y = 0; |
| @@ -2477,7 +2477,8 @@ x_scroll_bar_create (window, top, left, width, height) | |||
| 2477 | XCreateWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | 2477 | XCreateWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), |
| 2478 | 2478 | ||
| 2479 | /* Position and size of scroll bar. */ | 2479 | /* Position and size of scroll bar. */ |
| 2480 | left, top, width, height, | 2480 | left + VERTICAL_SCROLL_BAR_WIDTH_TRIM, top, |
| 2481 | width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2, height, | ||
| 2481 | 2482 | ||
| 2482 | /* Border width, depth, class, and visual. */ | 2483 | /* Border width, depth, class, and visual. */ |
| 2483 | 0, CopyFromParent, CopyFromParent, CopyFromParent, | 2484 | 0, CopyFromParent, CopyFromParent, CopyFromParent, |
| @@ -2626,9 +2627,10 @@ x_scroll_bar_move (bar, top, left, width, height) | |||
| 2626 | XWindowChanges wc; | 2627 | XWindowChanges wc; |
| 2627 | unsigned int mask = 0; | 2628 | unsigned int mask = 0; |
| 2628 | 2629 | ||
| 2629 | wc.x = left; | 2630 | wc.x = left + VERTICAL_SCROLL_BAR_WIDTH_TRIM; |
| 2630 | wc.y = top; | 2631 | wc.y = top; |
| 2631 | wc.width = width; | 2632 | |
| 2633 | wc.width = width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2; | ||
| 2632 | wc.height = height; | 2634 | wc.height = height; |
| 2633 | 2635 | ||
| 2634 | if (left != XINT (bar->left)) mask |= CWX; | 2636 | if (left != XINT (bar->left)) mask |= CWX; |
| @@ -2843,9 +2845,7 @@ x_scroll_bar_expose (bar, event) | |||
| 2843 | Window w = SCROLL_BAR_X_WINDOW (bar); | 2845 | Window w = SCROLL_BAR_X_WINDOW (bar); |
| 2844 | FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); | 2846 | FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); |
| 2845 | GC gc = f->output_data.x->normal_gc; | 2847 | GC gc = f->output_data.x->normal_gc; |
| 2846 | int width_trim = (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f) | 2848 | int width_trim = VERTICAL_SCROLL_BAR_WIDTH_TRIM; |
| 2847 | ? LEFT_VERTICAL_SCROLL_BAR_WIDTH_TRIM | ||
| 2848 | : 0); | ||
| 2849 | 2849 | ||
| 2850 | BLOCK_INPUT; | 2850 | BLOCK_INPUT; |
| 2851 | 2851 | ||
| @@ -2856,7 +2856,7 @@ x_scroll_bar_expose (bar, event) | |||
| 2856 | 2856 | ||
| 2857 | /* x, y, width, height */ | 2857 | /* x, y, width, height */ |
| 2858 | 0, 0, | 2858 | 0, 0, |
| 2859 | XINT (bar->width) - 1 - width_trim, | 2859 | XINT (bar->width) - 1 - width_trim - width_trim, |
| 2860 | XINT (bar->height) - 1); | 2860 | XINT (bar->height) - 1); |
| 2861 | 2861 | ||
| 2862 | UNBLOCK_INPUT; | 2862 | UNBLOCK_INPUT; |