summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1999-07-10 20:45:46 +0000
committerRichard M. Stallman <rms@gnu.org>1999-07-10 20:45:46 +0000
commiteea6af04ee1f5784fd073b344e881af31ddc1dfc (patch)
tree5a11b0b6a600768e9e4601788d219f80a9fadfbe
parenta0bcdd7f58bee1e0a29866e60e2af7b9ca26f7c6 (diff)
downloademacs-eea6af04ee1f5784fd073b344e881af31ddc1dfc.tar.gz
(x_display_bar_cursor): Use the cursor-color
to display the bar, not the cursor foreground pixel.
-rw-r--r--src/xterm.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c
index ab4da0cc3d3..2e057dac76f 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -4828,8 +4828,27 @@ x_display_bar_cursor (f, on, x, y)
&& x < current_glyphs->used[y])
? current_glyphs->glyphs[y][x]
: SPACEGLYPH);
+
+ {
+ XGCValues xgcv;
+ unsigned long mask;
+
+ xgcv.background = f->output_data.x->cursor_pixel;
+ xgcv.foreground = f->output_data.x->cursor_pixel;
+ xgcv.graphics_exposures = 0;
+ mask = GCForeground | GCBackground | GCGraphicsExposures;
+
+ if (FRAME_X_DISPLAY_INFO (f)->scratch_cursor_gc)
+ XChangeGC (FRAME_X_DISPLAY (f),
+ FRAME_X_DISPLAY_INFO (f)->scratch_cursor_gc,
+ mask, &xgcv);
+ else
+ FRAME_X_DISPLAY_INFO (f)->scratch_cursor_gc
+ = XCreateGC (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), mask, &xgcv);
+ }
+
XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
- f->output_data.x->cursor_gc,
+ FRAME_X_DISPLAY_INFO (f)->scratch_cursor_gc,
CHAR_TO_PIXEL_COL (f, x),
CHAR_TO_PIXEL_ROW (f, y),
max (f->output_data.x->cursor_width, 1),