aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2002-04-19 11:47:58 +0000
committerEli Zaretskii2002-04-19 11:47:58 +0000
commit65c26775c68321eb926384ea00e8282eb690807e (patch)
tree95a5bbcf5c0478cec3085b31dd4e4a553cf1e1f4 /src
parenta9653085d80e5e111ff77faeb1fb05f4c0083047 (diff)
downloademacs-65c26775c68321eb926384ea00e8282eb690807e.tar.gz
emacs-65c26775c68321eb926384ea00e8282eb690807e.zip
(x_draw_bar_cursor): New argument KIND; callers changed.
Handle the `hbar' cursor type. (x_display_and_set_cursor): Handle the HBAR_CURSOR case.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c29
1 files changed, 22 insertions, 7 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 13ee72ec8de..70b4b37c8b7 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -469,7 +469,8 @@ static void x_new_focus_frame P_ ((struct x_display_info *, struct frame *));
469static void XTframe_rehighlight P_ ((struct frame *)); 469static void XTframe_rehighlight P_ ((struct frame *));
470static void x_frame_rehighlight P_ ((struct x_display_info *)); 470static void x_frame_rehighlight P_ ((struct x_display_info *));
471static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *)); 471static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *));
472static void x_draw_bar_cursor P_ ((struct window *, struct glyph_row *, int)); 472static void x_draw_bar_cursor P_ ((struct window *, struct glyph_row *, int,
473 enum text_cursor_kinds));
473static int x_intersect_rectangles P_ ((XRectangle *, XRectangle *, 474static int x_intersect_rectangles P_ ((XRectangle *, XRectangle *,
474 XRectangle *)); 475 XRectangle *));
475static void expose_frame P_ ((struct frame *, int, int, int, int)); 476static void expose_frame P_ ((struct frame *, int, int, int, int));
@@ -11333,10 +11334,11 @@ x_draw_hollow_cursor (w, row)
11333 --gerd. */ 11334 --gerd. */
11334 11335
11335static void 11336static void
11336x_draw_bar_cursor (w, row, width) 11337x_draw_bar_cursor (w, row, width, kind)
11337 struct window *w; 11338 struct window *w;
11338 struct glyph_row *row; 11339 struct glyph_row *row;
11339 int width; 11340 int width;
11341 enum text_cursor_kinds kind;
11340{ 11342{
11341 struct frame *f = XFRAME (w->frame); 11343 struct frame *f = XFRAME (w->frame);
11342 struct glyph *cursor_glyph; 11344 struct glyph *cursor_glyph;
@@ -11390,10 +11392,19 @@ x_draw_bar_cursor (w, row, width)
11390 width = min (cursor_glyph->pixel_width, width); 11392 width = min (cursor_glyph->pixel_width, width);
11391 11393
11392 x_clip_to_row (w, row, gc, 0); 11394 x_clip_to_row (w, row, gc, 0);
11393 XFillRectangle (dpy, window, gc, 11395 if (kind == BAR_CURSOR)
11394 WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x), 11396 XFillRectangle (dpy, window, gc,
11395 WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y), 11397 WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x),
11396 width, row->height); 11398 WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y),
11399 width, row->height);
11400 else
11401 XFillRectangle (dpy, window, gc,
11402 WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x),
11403 WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y +
11404 row->height - width),
11405 cursor_glyph->pixel_width,
11406 width);
11407
11397 XSetClipMask (dpy, gc, None); 11408 XSetClipMask (dpy, gc, None);
11398 } 11409 }
11399} 11410}
@@ -11714,7 +11725,11 @@ x_display_and_set_cursor (w, on, hpos, vpos, x, y)
11714 break; 11725 break;
11715 11726
11716 case BAR_CURSOR: 11727 case BAR_CURSOR:
11717 x_draw_bar_cursor (w, glyph_row, new_cursor_width); 11728 x_draw_bar_cursor (w, glyph_row, new_cursor_width, BAR_CURSOR);
11729 break;
11730
11731 case HBAR_CURSOR:
11732 x_draw_bar_cursor (w, glyph_row, new_cursor_width, HBAR_CURSOR);
11718 break; 11733 break;
11719 11734
11720 case NO_CURSOR: 11735 case NO_CURSOR: