diff options
Diffstat (limited to 'src/w32term.c')
| -rw-r--r-- | src/w32term.c | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/src/w32term.c b/src/w32term.c index b564ed3bd2b..2870955b94f 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -91,6 +91,10 @@ static Lisp_Object last_window; | |||
| 91 | (Not yet supported, see TODO in x_draw_glyph_string.) */ | 91 | (Not yet supported, see TODO in x_draw_glyph_string.) */ |
| 92 | int x_use_underline_position_properties; | 92 | int x_use_underline_position_properties; |
| 93 | 93 | ||
| 94 | /* Non-zero means to draw the underline at the same place as the descent line. */ | ||
| 95 | |||
| 96 | int x_underline_at_descent_line; | ||
| 97 | |||
| 94 | extern unsigned int msh_mousewheel; | 98 | extern unsigned int msh_mousewheel; |
| 95 | 99 | ||
| 96 | extern void free_frame_menubar (); | 100 | extern void free_frame_menubar (); |
| @@ -2418,7 +2422,9 @@ x_draw_stretch_glyph_string (s) | |||
| 2418 | int background_width = s->background_width; | 2422 | int background_width = s->background_width; |
| 2419 | int x = s->x, left_x = window_box_left_offset (s->w, TEXT_AREA); | 2423 | int x = s->x, left_x = window_box_left_offset (s->w, TEXT_AREA); |
| 2420 | 2424 | ||
| 2421 | if (x < left_x) | 2425 | /* Don't draw into left margin, fringe or scrollbar area |
| 2426 | except for header line and mode line. */ | ||
| 2427 | if (x < left_x && !s->row->mode_line_p) | ||
| 2422 | { | 2428 | { |
| 2423 | background_width -= left_x - x; | 2429 | background_width -= left_x - x; |
| 2424 | x = left_x; | 2430 | x = left_x; |
| @@ -2507,21 +2513,27 @@ x_draw_glyph_string (s) | |||
| 2507 | && (s->font->bdf || !s->font->tm.tmUnderlined)) | 2513 | && (s->font->bdf || !s->font->tm.tmUnderlined)) |
| 2508 | { | 2514 | { |
| 2509 | unsigned long h = 1; | 2515 | unsigned long h = 1; |
| 2510 | unsigned long dy = s->height - h; | 2516 | unsigned long dy = 0; |
| 2511 | 2517 | ||
| 2512 | /* TODO: Use font information for positioning and thickness | 2518 | if (x_underline_at_descent_line) |
| 2513 | of underline. See OUTLINETEXTMETRIC, and xterm.c. | 2519 | dy = s->height - h; |
| 2514 | Note: If you make this work, don't forget to change the | 2520 | else |
| 2515 | doc string of x-use-underline-position-properties below. */ | 2521 | { |
| 2522 | /* TODO: Use font information for positioning and thickness of | ||
| 2523 | underline. See OUTLINETEXTMETRIC, and xterm.c. Note: If | ||
| 2524 | you make this work, don't forget to change the doc string of | ||
| 2525 | x-use-underline-position-properties below. */ | ||
| 2526 | dy = s->height - h; | ||
| 2527 | } | ||
| 2516 | if (s->face->underline_defaulted_p) | 2528 | if (s->face->underline_defaulted_p) |
| 2517 | { | 2529 | { |
| 2518 | w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x, | 2530 | w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x, |
| 2519 | s->y + dy, s->width, 1); | 2531 | s->y + dy, s->background_width, 1); |
| 2520 | } | 2532 | } |
| 2521 | else | 2533 | else |
| 2522 | { | 2534 | { |
| 2523 | w32_fill_area (s->f, s->hdc, s->face->underline_color, s->x, | 2535 | w32_fill_area (s->f, s->hdc, s->face->underline_color, s->x, |
| 2524 | s->y + dy, s->width, 1); | 2536 | s->y + dy, s->background_width, 1); |
| 2525 | } | 2537 | } |
| 2526 | } | 2538 | } |
| 2527 | 2539 | ||
| @@ -2533,12 +2545,12 @@ x_draw_glyph_string (s) | |||
| 2533 | if (s->face->overline_color_defaulted_p) | 2545 | if (s->face->overline_color_defaulted_p) |
| 2534 | { | 2546 | { |
| 2535 | w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x, | 2547 | w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x, |
| 2536 | s->y + dy, s->width, h); | 2548 | s->y + dy, s->background_width, h); |
| 2537 | } | 2549 | } |
| 2538 | else | 2550 | else |
| 2539 | { | 2551 | { |
| 2540 | w32_fill_area (s->f, s->hdc, s->face->overline_color, s->x, | 2552 | w32_fill_area (s->f, s->hdc, s->face->overline_color, s->x, |
| 2541 | s->y + dy, s->width, h); | 2553 | s->y + dy, s->background_width, h); |
| 2542 | } | 2554 | } |
| 2543 | } | 2555 | } |
| 2544 | 2556 | ||
| @@ -6509,6 +6521,14 @@ to 4.1, set this to nil. | |||
| 6509 | NOTE: Not supported on MS-Windows yet. */); | 6521 | NOTE: Not supported on MS-Windows yet. */); |
| 6510 | x_use_underline_position_properties = 0; | 6522 | x_use_underline_position_properties = 0; |
| 6511 | 6523 | ||
| 6524 | DEFVAR_BOOL ("x-underline-at-descent-line", | ||
| 6525 | &x_underline_at_descent_line, | ||
| 6526 | doc: /* *Non-nil means to draw the underline at the same place as the descent line. | ||
| 6527 | nil means to draw the underline according to the value of the variable | ||
| 6528 | `x-use-underline-position-properties', which is usually at the baseline | ||
| 6529 | level. The default value is nil. */); | ||
| 6530 | x_underline_at_descent_line = 0; | ||
| 6531 | |||
| 6512 | DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, | 6532 | DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, |
| 6513 | doc: /* If not nil, Emacs uses toolkit scroll bars. */); | 6533 | doc: /* If not nil, Emacs uses toolkit scroll bars. */); |
| 6514 | Vx_toolkit_scroll_bars = Qt; | 6534 | Vx_toolkit_scroll_bars = Qt; |