Mercurial > emacs
diff src/xfns.c @ 83504:7aa43f830ce4
Fix tooltip border color.
* src/xterm.h (x_output): Remove background_pixel and foreground_pixel
fields.
* src/widget.c (update_from_various_frame_slots): Use
FRAME_BACKGROUND_PIXEL and FRAME_FOREGROUND_PIXEL.
* src/xfns.c (x_set_foreground_color): Ditto.
* src/xfns.c (x_set_background_color): Ditto.
* src/xfns.c (x_set_mouse_color): Ditto.
* src/xfns.c (x_set_cursor_color): Ditto.
* src/xfns.c (x_make_gc): Ditto.
* src/xfns.c (Fx_create_frame): Ditto.
* src/xfns.c (x_create_tip_frame): Ditto.
* src/xfns.c (build_string): Ditto.
* src/xterm.c (XTflash): Ditto.
* src/xterm.c (x_free_frame_resources): Ditto.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-544
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sat, 01 Apr 2006 16:11:29 +0000 |
parents | c1e013e3dc0e |
children | 57e924639750 |
line wrap: on
line diff
--- a/src/xfns.c Sat Apr 01 13:36:08 2006 +0000 +++ b/src/xfns.c Sat Apr 01 16:11:29 2006 +0000 @@ -865,8 +865,8 @@ unsigned long fg, old_fg; fg = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f)); - old_fg = x->foreground_pixel; - x->foreground_pixel = fg; + old_fg = FRAME_FOREGROUND_PIXEL (f); + FRAME_FOREGROUND_PIXEL (f) = fg; if (FRAME_X_WINDOW (f) != 0) { @@ -903,8 +903,8 @@ unsigned long bg; bg = x_decode_color (f, arg, WHITE_PIX_DEFAULT (f)); - unload_color (f, x->background_pixel); - x->background_pixel = bg; + unload_color (f, FRAME_BACKGROUND_PIXEL (f)); + FRAME_BACKGROUND_PIXEL (f) = bg; if (FRAME_X_WINDOW (f) != 0) { @@ -952,13 +952,13 @@ Cursor cursor, nontext_cursor, mode_cursor, hand_cursor; Cursor hourglass_cursor, horizontal_drag_cursor; unsigned long pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f)); - unsigned long mask_color = x->background_pixel; + unsigned long mask_color = FRAME_BACKGROUND_PIXEL (f); /* Don't let pointers be invisible. */ if (mask_color == pixel) { x_free_colors (f, &pixel, 1); - pixel = x_copy_color (f, x->foreground_pixel); + pixel = x_copy_color (f, FRAME_FOREGROUND_PIXEL (f)); } unload_color (f, x->mouse_pixel); @@ -1101,13 +1101,13 @@ fore_pixel_allocated_p = 1; } else - fore_pixel = x->background_pixel; + fore_pixel = FRAME_BACKGROUND_PIXEL (f); pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f)); pixel_allocated_p = 1; /* Make sure that the cursor color differs from the background color. */ - if (pixel == x->background_pixel) + if (pixel == FRAME_BACKGROUND_PIXEL (f)) { if (pixel_allocated_p) { @@ -1123,7 +1123,7 @@ x_free_colors (f, &fore_pixel, 1); fore_pixel_allocated_p = 0; } - fore_pixel = x->background_pixel; + fore_pixel = FRAME_BACKGROUND_PIXEL (f); } } @@ -2868,8 +2868,8 @@ /* Normal video */ gc_values.font = FRAME_FONT (f)->fid; - gc_values.foreground = f->output_data.x->foreground_pixel; - gc_values.background = f->output_data.x->background_pixel; + gc_values.foreground = FRAME_FOREGROUND_PIXEL (f); + gc_values.background = FRAME_BACKGROUND_PIXEL (f); gc_values.line_width = 0; /* Means 1 using fast algorithm. */ f->output_data.x->normal_gc = XCreateGC (FRAME_X_DISPLAY (f), @@ -2878,8 +2878,8 @@ &gc_values); /* Reverse video style. */ - gc_values.foreground = f->output_data.x->background_pixel; - gc_values.background = f->output_data.x->foreground_pixel; + gc_values.foreground = FRAME_BACKGROUND_PIXEL (f); + gc_values.background = FRAME_FOREGROUND_PIXEL (f); f->output_data.x->reverse_gc = XCreateGC (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), @@ -2887,7 +2887,7 @@ &gc_values); /* Cursor has cursor-color background, background-color foreground. */ - gc_values.foreground = f->output_data.x->background_pixel; + gc_values.foreground = FRAME_BACKGROUND_PIXEL (f); gc_values.background = f->output_data.x->cursor_pixel; gc_values.fill_style = FillOpaqueStippled; gc_values.stipple @@ -2911,8 +2911,8 @@ = (XCreatePixmapFromBitmapData (FRAME_X_DISPLAY (f), FRAME_X_DISPLAY_INFO (f)->root_window, gray_bits, gray_width, gray_height, - f->output_data.x->foreground_pixel, - f->output_data.x->background_pixel, + FRAME_FOREGROUND_PIXEL (f), + FRAME_BACKGROUND_PIXEL (f), DefaultDepth (FRAME_X_DISPLAY (f), FRAME_X_SCREEN_NUMBER (f)))); UNBLOCK_INPUT; @@ -3116,8 +3116,8 @@ /* Function x_decode_color can signal an error. Make sure to initialize color slots so that we won't try to free colors we haven't allocated. */ - f->output_data.x->foreground_pixel = -1; - f->output_data.x->background_pixel = -1; + FRAME_FOREGROUND_PIXEL (f) = -1; + FRAME_BACKGROUND_PIXEL (f) = -1; f->output_data.x->cursor_pixel = -1; f->output_data.x->cursor_foreground_pixel = -1; f->output_data.x->border_pixel = -1; @@ -3125,9 +3125,9 @@ black = build_string ("black"); GCPRO1 (black); - f->output_data.x->foreground_pixel + FRAME_FOREGROUND_PIXEL (f) = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); - f->output_data.x->background_pixel + FRAME_BACKGROUND_PIXEL (f) = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); f->output_data.x->cursor_pixel = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); @@ -4698,8 +4698,8 @@ /* Function x_decode_color can signal an error. Make sure to initialize color slots so that we won't try to free colors we haven't allocated. */ - f->output_data.x->foreground_pixel = -1; - f->output_data.x->background_pixel = -1; + FRAME_FOREGROUND_PIXEL (f) = -1; + FRAME_BACKGROUND_PIXEL (f) = -1; f->output_data.x->cursor_pixel = -1; f->output_data.x->cursor_foreground_pixel = -1; f->output_data.x->border_pixel = -1; @@ -4707,9 +4707,9 @@ black = build_string ("black"); GCPRO1 (black); - f->output_data.x->foreground_pixel + FRAME_FOREGROUND_PIXEL (f) = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); - f->output_data.x->background_pixel + FRAME_BACKGROUND_PIXEL (f) = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); f->output_data.x->cursor_pixel = x_decode_color (f, black, BLACK_PIX_DEFAULT (f));