# HG changeset patch # User Jason Rumney # Date 975608401 0 # Node ID 0044985507c73bc1fea7be74d3d3b747f57505c7 # Parent 60c5c17f74cf840251ca43e9d3f0d8d8d241e89c (x_set_cursor_color): Use x_update_cursor instead of x_display_cursor. diff -r 60c5c17f74cf -r 0044985507c7 src/w32fns.c --- a/src/w32fns.c Thu Nov 30 18:18:57 2000 +0000 +++ b/src/w32fns.c Thu Nov 30 18:20:01 2000 +0000 @@ -2153,35 +2153,41 @@ #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)) - { - f->output_data.w32->cursor_pixel = f->output_data.w32->mouse_pixel; - if (f->output_data.w32->cursor_pixel == fore_pixel) + if (pixel == FRAME_BACKGROUND_PIXEL (f)) + { + 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); } }