changeset 34062:0044985507c7

(x_set_cursor_color): Use x_update_cursor instead of x_display_cursor.
author Jason Rumney <jasonr@gnu.org>
date Thu, 30 Nov 2000 18:20:01 +0000
parents 60c5c17f74cf
children a1ed1d4ee8c4
files src/w32fns.c
diffstat 1 files changed, 15 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- 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);
 	}
     }