2014-10-18 Eli Zaretskii <eliz@gnu.org>
+ * xterm.c (x_draw_bar_cursor, x_draw_hollow_cursor): Subtract 1
+ pixel from the window's cursor glyph width, since X renders hollow
+ blocks 1 pixel wider than the 'width' parameter.
+
+ * xdisp.c (get_phys_cursor_geometry): Don't subtract 1 pixel from
+ glyph->pixel_width; this is now done in xterm.c.
+
Fix reordering of bracket characters in isolates.
* bidi.c (bidi_cache_find): Rename the argument NEUTRALS_OK to
RESOLVED_ONLY; when non-zero, return from the cache only fully
glyph, and `x-stretch-block-cursor' is nil, don't draw a
rectangle as wide as the glyph, but use a canonical character
width instead. */
- wd = glyph->pixel_width - 1;
-#if defined (HAVE_NTGUI) || defined (HAVE_NS)
- wd++; /* Why? */
-#endif
+ wd = glyph->pixel_width;
x = w->phys_cursor.x;
if (x < 0)
/* Compute frame-relative coordinates for phys cursor. */
get_phys_cursor_geometry (w, row, cursor_glyph, &x, &y, &h);
- wd = w->phys_cursor_width;
+ wd = w->phys_cursor_width - 1;
/* The foreground of cursor_gc is typically the same as the normal
background color, which can cause the cursor box to be invisible. */
glyph, unless the cursor box is as wide as the glyph or wider
(the latter happens when x-stretch-cursor is non-nil). */
if ((cursor_glyph->resolved_level & 1) != 0
- && cursor_glyph->pixel_width > w->phys_cursor_width)
+ && cursor_glyph->pixel_width > wd)
{
- x += cursor_glyph->pixel_width - w->phys_cursor_width;
+ x += cursor_glyph->pixel_width - wd;
if (wd > 0)
wd -= 1;
}
&dummy_y, &dummy_h);
if ((cursor_glyph->resolved_level & 1) != 0
- && cursor_glyph->pixel_width > w->phys_cursor_width)
- x += cursor_glyph->pixel_width - w->phys_cursor_width;
+ && cursor_glyph->pixel_width > w->phys_cursor_width - 1)
+ x += cursor_glyph->pixel_width - w->phys_cursor_width + 1;
XFillRectangle (dpy, window, gc, x,
WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y +
row->height - width),
- w->phys_cursor_width, width);
+ w->phys_cursor_width - 1, width);
}
XSetClipMask (dpy, gc, None);