comparison src/xterm.c @ 109845:350a910f00bf

xterm.c (x_draw_bar_cursor): Fix last change.
author Eli Zaretskii <eliz@gnu.org>
date Wed, 18 Aug 2010 22:06:11 +0300
parents 1ada063020ba
children c403c2e0a620
comparison
equal deleted inserted replaced
109844:7d60b9e85349 109845:350a910f00bf
7150 7150
7151 x_clip_to_row (w, row, TEXT_AREA, gc); 7151 x_clip_to_row (w, row, TEXT_AREA, gc);
7152 7152
7153 if (kind == BAR_CURSOR) 7153 if (kind == BAR_CURSOR)
7154 { 7154 {
7155 int x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x);
7156
7155 if (width < 0) 7157 if (width < 0)
7156 width = FRAME_CURSOR_WIDTH (f); 7158 width = FRAME_CURSOR_WIDTH (f);
7157 width = min (cursor_glyph->pixel_width, width); 7159 width = min (cursor_glyph->pixel_width, width);
7158 7160
7159 w->phys_cursor_width = width; 7161 w->phys_cursor_width = width;
7161 /* If the character under cursor is R2L, draw the bar cursor 7163 /* If the character under cursor is R2L, draw the bar cursor
7162 on the right of its glyph, rather than on the left. */ 7164 on the right of its glyph, rather than on the left. */
7163 if ((cursor_glyph->resolved_level & 1) != 0) 7165 if ((cursor_glyph->resolved_level & 1) != 0)
7164 x += cursor_glyph->pixel_width - width; 7166 x += cursor_glyph->pixel_width - width;
7165 7167
7166 XFillRectangle (dpy, window, gc, 7168 XFillRectangle (dpy, window, gc, x,
7167 WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x),
7168 WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y), 7169 WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y),
7169 width, row->height); 7170 width, row->height);
7170 } 7171 }
7171 else 7172 else
7172 { 7173 {