aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Rumney2000-11-30 18:20:01 +0000
committerJason Rumney2000-11-30 18:20:01 +0000
commit70a0239a73aad3f579bf56c0836806e219e7a4f2 (patch)
tree30b11fdcd2443ddaf468968666f37094556f9d36 /src
parent162de750d21270abd20b84696d47fdde18b8d092 (diff)
downloademacs-70a0239a73aad3f579bf56c0836806e219e7a4f2.tar.gz
emacs-70a0239a73aad3f579bf56c0836806e219e7a4f2.zip
(x_set_cursor_color): Use x_update_cursor instead of x_display_cursor.
Diffstat (limited to 'src')
-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)
2153#endif /* TODO */ 2153#endif /* TODO */
2154} 2154}
2155 2155
2156/* Defined in w32term.c. */
2157void x_update_cursor (struct frame *f, int on_p);
2158
2156void 2159void
2157x_set_cursor_color (f, arg, oldval) 2160x_set_cursor_color (f, arg, oldval)
2158 struct frame *f; 2161 struct frame *f;
2159 Lisp_Object arg, oldval; 2162 Lisp_Object arg, oldval;
2160{ 2163{
2161 unsigned long fore_pixel; 2164 unsigned long fore_pixel, pixel;
2162 2165
2163 if (!NILP (Vx_cursor_fore_pixel)) 2166 if (!NILP (Vx_cursor_fore_pixel))
2164 fore_pixel = x_decode_color (f, Vx_cursor_fore_pixel, 2167 fore_pixel = x_decode_color (f, Vx_cursor_fore_pixel,
2165 WHITE_PIX_DEFAULT (f)); 2168 WHITE_PIX_DEFAULT (f));
2166 else 2169 else
2167 fore_pixel = FRAME_BACKGROUND_PIXEL (f); 2170 fore_pixel = FRAME_BACKGROUND_PIXEL (f);
2168 f->output_data.w32->cursor_pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f)); 2171
2172 pixel = x_decode_color (f, arg, BLACK_PIXEL_DEFAULT (f));
2169 2173
2170 /* Make sure that the cursor color differs from the background color. */ 2174 /* Make sure that the cursor color differs from the background color. */
2171 if (f->output_data.w32->cursor_pixel == FRAME_BACKGROUND_PIXEL (f)) 2175 if (pixel == FRAME_BACKGROUND_PIXEL (f))
2172 { 2176 {
2173 f->output_data.w32->cursor_pixel = f->output_data.w32->mouse_pixel; 2177 pixel = f->output_data.w32->mouse_pixel;
2174 if (f->output_data.w32->cursor_pixel == fore_pixel) 2178 if (pixel == fore_pixel)
2175 fore_pixel = FRAME_BACKGROUND_PIXEL (f); 2179 fore_pixel = FRAME_BACKGROUND_PIXEL (f);
2176 } 2180 }
2181
2177 FRAME_FOREGROUND_PIXEL (f) = fore_pixel; 2182 FRAME_FOREGROUND_PIXEL (f) = fore_pixel;
2183 f->output_data.w32->cursor_pixel = pixel;
2178 2184
2179 if (FRAME_W32_WINDOW (f) != 0) 2185 if (FRAME_W32_WINDOW (f) != 0)
2180 { 2186 {
2181 if (FRAME_VISIBLE_P (f)) 2187 if (FRAME_VISIBLE_P (f))
2182 { 2188 {
2183 x_display_cursor (f, 0); 2189 x_update_cursor (f, 0);
2184 x_display_cursor (f, 1); 2190 x_update_cursor (f, 1);
2185 } 2191 }
2186 } 2192 }
2187 2193