aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
authorStefan Monnier2014-09-22 15:20:45 -0400
committerStefan Monnier2014-09-22 15:20:45 -0400
commit9949231fb06aa4a2dfa536e9d5125a81424db3a7 (patch)
treea2259e8489127b8685097a20a3fd3d7be222d9fe /src/xterm.c
parent298dfce8ac018aca6f8f1a38d7199cc28bfaf7fd (diff)
parentfc5ebc3f497a152132407d57a14cce147d59d29c (diff)
downloademacs-9949231fb06aa4a2dfa536e9d5125a81424db3a7.tar.gz
emacs-9949231fb06aa4a2dfa536e9d5125a81424db3a7.zip
Merge from emacs-24
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 1426546d3ae..4b4349d2622 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -2474,7 +2474,7 @@ x_draw_stretch_glyph_string (struct glyph_string *s)
2474 { 2474 {
2475 /* In R2L rows, draw the cursor on the right edge of the 2475 /* In R2L rows, draw the cursor on the right edge of the
2476 stretch glyph. */ 2476 stretch glyph. */
2477 int right_x = window_box_right_offset (s->w, TEXT_AREA); 2477 int right_x = window_box_right (s->w, TEXT_AREA);
2478 2478
2479 if (x + background_width > right_x) 2479 if (x + background_width > right_x)
2480 background_width -= x - right_x; 2480 background_width -= x - right_x;
@@ -7977,6 +7977,15 @@ x_draw_hollow_cursor (struct window *w, struct glyph_row *row)
7977 GCForeground, &xgcv); 7977 GCForeground, &xgcv);
7978 gc = dpyinfo->scratch_cursor_gc; 7978 gc = dpyinfo->scratch_cursor_gc;
7979 7979
7980 /* When on R2L character, show cursor at the right edge of the
7981 glyph, unless the cursor box is as wide as the glyph or wider
7982 (the latter happens when x-stretch-cursor is non-nil). */
7983 if ((cursor_glyph->resolved_level & 1) != 0
7984 && cursor_glyph->pixel_width > w->phys_cursor_width)
7985 {
7986 x += cursor_glyph->pixel_width - w->phys_cursor_width;
7987 wd -= 1;
7988 }
7980 /* Set clipping, draw the rectangle, and reset clipping again. */ 7989 /* Set clipping, draw the rectangle, and reset clipping again. */
7981 x_clip_to_row (w, row, TEXT_AREA, gc); 7990 x_clip_to_row (w, row, TEXT_AREA, gc);
7982 XDrawRectangle (dpy, FRAME_X_WINDOW (f), gc, x, y, wd, h - 1); 7991 XDrawRectangle (dpy, FRAME_X_WINDOW (f), gc, x, y, wd, h - 1);
@@ -8062,9 +8071,10 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text
8062 WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y), 8071 WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y),
8063 width, row->height); 8072 width, row->height);
8064 } 8073 }
8065 else 8074 else /* HBAR_CURSOR */
8066 { 8075 {
8067 int dummy_x, dummy_y, dummy_h; 8076 int dummy_x, dummy_y, dummy_h;
8077 int x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x);
8068 8078
8069 if (width < 0) 8079 if (width < 0)
8070 width = row->height; 8080 width = row->height;
@@ -8074,8 +8084,10 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text
8074 get_phys_cursor_geometry (w, row, cursor_glyph, &dummy_x, 8084 get_phys_cursor_geometry (w, row, cursor_glyph, &dummy_x,
8075 &dummy_y, &dummy_h); 8085 &dummy_y, &dummy_h);
8076 8086
8077 XFillRectangle (dpy, window, gc, 8087 if ((cursor_glyph->resolved_level & 1) != 0
8078 WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x), 8088 && cursor_glyph->pixel_width > w->phys_cursor_width)
8089 x += cursor_glyph->pixel_width - w->phys_cursor_width;
8090 XFillRectangle (dpy, window, gc, x,
8079 WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y + 8091 WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y +
8080 row->height - width), 8092 row->height - width),
8081 w->phys_cursor_width, width); 8093 w->phys_cursor_width, width);