unsigned long pixel
= x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
- if (f->output_data.x->foreground_pixel != f->output_data.x->mouse_pixel
- && f->output_data.x->foreground_pixel != f->output_data.x->cursor_pixel
- && f->output_data.x->foreground_pixel != f->output_data.x->cursor_foreground_pixel)
- unload_color (f, f->output_data.x->foreground_pixel);
+ unload_color (f, f->output_data.x->foreground_pixel);
f->output_data.x->foreground_pixel = pixel;
if (FRAME_X_WINDOW (f) != 0)
unsigned long pixel
= x_decode_color (f, arg, WHITE_PIX_DEFAULT (f));
- if (f->output_data.x->background_pixel != f->output_data.x->mouse_pixel
- && f->output_data.x->background_pixel != f->output_data.x->cursor_pixel
- && f->output_data.x->background_pixel != f->output_data.x->cursor_foreground_pixel)
- unload_color (f, f->output_data.x->background_pixel);
+ unload_color (f, f->output_data.x->background_pixel);
f->output_data.x->background_pixel = pixel;
if (FRAME_X_WINDOW (f) != 0)
Cursor cursor, nontext_cursor, mode_cursor, cross_cursor;
Cursor busy_cursor;
int count;
- int mask_color;
- unsigned long pixel = f->output_data.x->mouse_pixel;
-
- if (!EQ (Qnil, arg))
- pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
+ unsigned long pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
+ unsigned long mask_color = f->output_data.x->background_pixel;
- mask_color = f->output_data.x->background_pixel;
- /* No invisible pointers. */
+ /* Don't let pointers be invisible. */
if (mask_color == pixel
&& mask_color == f->output_data.x->background_pixel)
pixel = f->output_data.x->foreground_pixel;
- if (f->output_data.x->background_pixel != f->output_data.x->mouse_pixel
- && f->output_data.x->foreground_pixel != f->output_data.x->mouse_pixel
- && f->output_data.x->cursor_pixel != f->output_data.x->mouse_pixel
- && f->output_data.x->cursor_foreground_pixel != f->output_data.x->mouse_pixel)
- unload_color (f, f->output_data.x->mouse_pixel);
+ unload_color (f, f->output_data.x->mouse_pixel);
f->output_data.x->mouse_pixel = pixel;
BLOCK_INPUT;
fore_pixel = f->output_data.x->background_pixel;
}
- if (f->output_data.x->background_pixel != f->output_data.x->cursor_foreground_pixel
- && f->output_data.x->foreground_pixel != f->output_data.x->cursor_foreground_pixel
- && f->output_data.x->mouse_pixel != f->output_data.x->cursor_foreground_pixel
- && f->output_data.x->cursor_pixel != f->output_data.x->cursor_foreground_pixel)
- unload_color (f, f->output_data.x->cursor_foreground_pixel);
+ unload_color (f, f->output_data.x->cursor_foreground_pixel);
f->output_data.x->cursor_foreground_pixel = fore_pixel;
- if (f->output_data.x->background_pixel != f->output_data.x->cursor_pixel
- && f->output_data.x->foreground_pixel != f->output_data.x->cursor_pixel
- && f->output_data.x->mouse_pixel != f->output_data.x->cursor_pixel
- && f->output_data.x->cursor_foreground_pixel != f->output_data.x->cursor_pixel)
- unload_color (f, f->output_data.x->cursor_pixel);
+ unload_color (f, f->output_data.x->cursor_pixel);
f->output_data.x->cursor_pixel = pixel;
if (FRAME_X_WINDOW (f) != 0)