summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Rumney <jasonr@gnu.org>2000-11-30 18:20:01 +0000
committerJason Rumney <jasonr@gnu.org>2000-11-30 18:20:01 +0000
commit70a0239a73aad3f579bf56c0836806e219e7a4f2 (patch)
tree30b11fdcd2443ddaf468968666f37094556f9d36
parent162de750d21270abd20b84696d47fdde18b8d092 (diff)
downloademacs-70a0239a73aad3f579bf56c0836806e219e7a4f2.tar.gz
(x_set_cursor_color): Use x_update_cursor instead of x_display_cursor.
-rw-r--r--src/w32fns.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index d6385204119..933b84b2ce0 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -2153,35 +2153,41 @@ x_set_mouse_color (f, arg, oldval)
#endif /* TODO */
}
+/* Defined in w32term.c. */
+void x_update_cursor (struct frame *f, int on_p);
+
void
x_set_cursor_color (f, arg, oldval)
struct frame *f;
Lisp_Object arg, oldval;
{
- unsigned long fore_pixel;
+ unsigned long fore_pixel, pixel;
if (!NILP (Vx_cursor_fore_pixel))
fore_pixel = x_decode_color (f, Vx_cursor_fore_pixel,
- WHITE_PIX_DEFAULT (f));
+ WHITE_PIX_DEFAULT (f));
else
fore_pixel = FRAME_BACKGROUND_PIXEL (f);
- f->output_data.w32->cursor_pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
+
+ pixel = x_decode_color (f, arg, BLACK_PIXEL_DEFAULT (f));
/* Make sure that the cursor color differs from the background color. */
- if (f->output_data.w32->cursor_pixel == FRAME_BACKGROUND_PIXEL (f))
+ if (pixel == FRAME_BACKGROUND_PIXEL (f))
{
- f->output_data.w32->cursor_pixel = f->output_data.w32->mouse_pixel;
- if (f->output_data.w32->cursor_pixel == fore_pixel)
+ pixel = f->output_data.w32->mouse_pixel;
+ if (pixel == fore_pixel)
fore_pixel = FRAME_BACKGROUND_PIXEL (f);
}
+
FRAME_FOREGROUND_PIXEL (f) = fore_pixel;
+ f->output_data.w32->cursor_pixel = pixel;
if (FRAME_W32_WINDOW (f) != 0)
{
if (FRAME_VISIBLE_P (f))
{
- x_display_cursor (f, 0);
- x_display_cursor (f, 1);
+ x_update_cursor (f, 0);
+ x_update_cursor (f, 1);
}
}