diff options
Diffstat (limited to 'src/xterm.c')
| -rw-r--r-- | src/xterm.c | 51 |
1 files changed, 30 insertions, 21 deletions
diff --git a/src/xterm.c b/src/xterm.c index c25f23cc573..7407585ebf0 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -326,20 +326,8 @@ static int x_alloc_nearest_color_1 P_ ((Display *, Colormap, XColor *)); | |||
| 326 | static void x_set_window_size_1 P_ ((struct frame *, int, int, int)); | 326 | static void x_set_window_size_1 P_ ((struct frame *, int, int, int)); |
| 327 | static const XColor *x_color_cells P_ ((Display *, int *)); | 327 | static const XColor *x_color_cells P_ ((Display *, int *)); |
| 328 | static void x_update_window_end P_ ((struct window *, int, int)); | 328 | static void x_update_window_end P_ ((struct window *, int, int)); |
| 329 | void x_delete_display P_ ((struct x_display_info *)); | ||
| 330 | 329 | ||
| 331 | static int x_io_error_quitter P_ ((Display *)); | 330 | static int x_io_error_quitter P_ ((Display *)); |
| 332 | void x_catch_errors P_ ((Display *)); | ||
| 333 | void x_uncatch_errors P_ ((void)); | ||
| 334 | void x_lower_frame P_ ((struct frame *)); | ||
| 335 | void x_scroll_bar_clear P_ ((struct frame *)); | ||
| 336 | int x_had_errors_p P_ ((Display *)); | ||
| 337 | void x_wm_set_size_hint P_ ((struct frame *, long, int)); | ||
| 338 | void x_raise_frame P_ ((struct frame *)); | ||
| 339 | void x_set_window_size P_ ((struct frame *, int, int, int)); | ||
| 340 | void x_wm_set_window_state P_ ((struct frame *, int)); | ||
| 341 | void x_wm_set_icon_pixmap P_ ((struct frame *, int)); | ||
| 342 | void x_initialize P_ ((void)); | ||
| 343 | static void x_font_min_bounds P_ ((XFontStruct *, int *, int *)); | 331 | static void x_font_min_bounds P_ ((XFontStruct *, int *, int *)); |
| 344 | static int x_compute_min_glyph_bounds P_ ((struct frame *)); | 332 | static int x_compute_min_glyph_bounds P_ ((struct frame *)); |
| 345 | static void x_update_end P_ ((struct frame *)); | 333 | static void x_update_end P_ ((struct frame *)); |
| @@ -374,6 +362,7 @@ static void x_check_fullscreen P_ ((struct frame *)); | |||
| 374 | static void x_check_expected_move P_ ((struct frame *)); | 362 | static void x_check_expected_move P_ ((struct frame *)); |
| 375 | static int handle_one_xevent P_ ((struct x_display_info *, XEvent *, | 363 | static int handle_one_xevent P_ ((struct x_display_info *, XEvent *, |
| 376 | int *, struct input_event *)); | 364 | int *, struct input_event *)); |
| 365 | static SIGTYPE x_connection_closed P_ ((Display *, char *)); | ||
| 377 | 366 | ||
| 378 | 367 | ||
| 379 | /* Flush display of frame F, or of all frames if F is null. */ | 368 | /* Flush display of frame F, or of all frames if F is null. */ |
| @@ -2694,19 +2683,28 @@ x_draw_stretch_glyph_string (s) | |||
| 2694 | { | 2683 | { |
| 2695 | /* If `x-stretch-block-cursor' is nil, don't draw a block cursor | 2684 | /* If `x-stretch-block-cursor' is nil, don't draw a block cursor |
| 2696 | as wide as the stretch glyph. */ | 2685 | as wide as the stretch glyph. */ |
| 2697 | int width = min (FRAME_COLUMN_WIDTH (s->f), s->background_width); | 2686 | int width, background_width = s->background_width; |
| 2687 | int x = s->x, left_x = window_box_left_offset (s->w, TEXT_AREA); | ||
| 2688 | |||
| 2689 | if (x < left_x) | ||
| 2690 | { | ||
| 2691 | background_width -= left_x - x; | ||
| 2692 | x = left_x; | ||
| 2693 | } | ||
| 2694 | width = min (FRAME_COLUMN_WIDTH (s->f), background_width); | ||
| 2698 | 2695 | ||
| 2699 | /* Draw cursor. */ | 2696 | /* Draw cursor. */ |
| 2700 | x_draw_glyph_string_bg_rect (s, s->x, s->y, width, s->height); | 2697 | x_draw_glyph_string_bg_rect (s, x, s->y, width, s->height); |
| 2701 | 2698 | ||
| 2702 | /* Clear rest using the GC of the original non-cursor face. */ | 2699 | /* Clear rest using the GC of the original non-cursor face. */ |
| 2703 | if (width < s->background_width) | 2700 | if (width < background_width) |
| 2704 | { | 2701 | { |
| 2705 | int x = s->x + width, y = s->y; | 2702 | int y = s->y; |
| 2706 | int w = s->background_width - width, h = s->height; | 2703 | int w = background_width - width, h = s->height; |
| 2707 | XRectangle r; | 2704 | XRectangle r; |
| 2708 | GC gc; | 2705 | GC gc; |
| 2709 | 2706 | ||
| 2707 | x += width; | ||
| 2710 | if (s->row->mouse_face_p | 2708 | if (s->row->mouse_face_p |
| 2711 | && cursor_in_mouse_face_p (s->w)) | 2709 | && cursor_in_mouse_face_p (s->w)) |
| 2712 | { | 2710 | { |
| @@ -2737,8 +2735,18 @@ x_draw_stretch_glyph_string (s) | |||
| 2737 | } | 2735 | } |
| 2738 | } | 2736 | } |
| 2739 | else if (!s->background_filled_p) | 2737 | else if (!s->background_filled_p) |
| 2740 | x_draw_glyph_string_bg_rect (s, s->x, s->y, s->background_width, | 2738 | { |
| 2741 | s->height); | 2739 | int background_width = s->background_width; |
| 2740 | int x = s->x, left_x = window_box_left_offset (s->w, TEXT_AREA); | ||
| 2741 | |||
| 2742 | if (x < left_x) | ||
| 2743 | { | ||
| 2744 | background_width -= left_x - x; | ||
| 2745 | x = left_x; | ||
| 2746 | } | ||
| 2747 | if (background_width > 0) | ||
| 2748 | x_draw_glyph_string_bg_rect (s, x, s->y, background_width, s->height); | ||
| 2749 | } | ||
| 2742 | 2750 | ||
| 2743 | s->background_filled_p = 1; | 2751 | s->background_filled_p = 1; |
| 2744 | } | 2752 | } |
| @@ -6320,6 +6328,8 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6320 | 6328 | ||
| 6321 | f = x_any_window_to_frame (dpyinfo, event.xkey.window); | 6329 | f = x_any_window_to_frame (dpyinfo, event.xkey.window); |
| 6322 | 6330 | ||
| 6331 | /* If mouse-highlight is an integer, input clears out | ||
| 6332 | mouse highlighting. */ | ||
| 6323 | if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) | 6333 | if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) |
| 6324 | && (f == 0 | 6334 | && (f == 0 |
| 6325 | || !EQ (f->tool_bar_window, dpyinfo->mouse_face_window))) | 6335 | || !EQ (f->tool_bar_window, dpyinfo->mouse_face_window))) |
| @@ -7375,8 +7385,7 @@ x_draw_hollow_cursor (w, row) | |||
| 7375 | return; | 7385 | return; |
| 7376 | 7386 | ||
| 7377 | /* Compute frame-relative coordinates for phys cursor. */ | 7387 | /* Compute frame-relative coordinates for phys cursor. */ |
| 7378 | x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); | 7388 | get_phys_cursor_geometry (w, row, cursor_glyph, &x, &y, &h); |
| 7379 | y = get_phys_cursor_geometry (w, row, cursor_glyph, &h); | ||
| 7380 | wd = w->phys_cursor_width; | 7389 | wd = w->phys_cursor_width; |
| 7381 | 7390 | ||
| 7382 | /* The foreground of cursor_gc is typically the same as the normal | 7391 | /* The foreground of cursor_gc is typically the same as the normal |