diff options
author | Karoly Lorentey <[email protected]> | 2006-04-01 16:37:26 +0000 |
---|---|---|
committer | Karoly Lorentey <[email protected]> | 2006-04-01 16:37:26 +0000 |
commit | 5bcee7efff25b675da6da4d6dd31c6bbc822b957 (patch) | |
tree | b898b9ac65601355dc9f7cf018042bdb3591c1ac /src | |
parent | ce593f6e6b85e58206264cad983c796ce8dd41a2 (diff) |
Fix previous commit.
* src/frame.c (make_terminal_frame): Use FRAME_BACKGROUND_PIXEL and FRAME_FOREGROUND_PIXEL.
* src/gtkutil.c (xg_create_frame_widgets): Ditto.
* src/macfns.c (x_set_mouse_color): Ditto.
* src/macfns.c (x_make_gc): Ditto.
* src/msdos.c (ScreenVisualBell): Ditto.
* src/msdos.c (internal_terminal_init): Ditto.
* src/w32term.c (x_free_frame_resources): Ditto.
* src/xfns.c (x_window): Ditto.
* src/xterm.c (x_scroll_bar_create): Ditto.
* src/xterm.c (x_scroll_bar_set_handle): Ditto.
git-archimport-id: [email protected]/emacs--multi-tty--0--patch-545
Diffstat (limited to 'src')
-rw-r--r-- | src/frame.c | 8 | ||||
-rw-r--r-- | src/gtkutil.c | 2 | ||||
-rw-r--r-- | src/macfns.c | 8 | ||||
-rw-r--r-- | src/msdos.c | 12 | ||||
-rw-r--r-- | src/w32term.c | 4 | ||||
-rw-r--r-- | src/xfns.c | 2 | ||||
-rw-r--r-- | src/xterm.c | 4 |
7 files changed, 20 insertions, 20 deletions
diff --git a/src/frame.c b/src/frame.c index e5cd660fbd..988b143693 100644 --- a/src/frame.c +++ b/src/frame.c @@ -588,11 +588,11 @@ make_terminal_frame (struct terminal *terminal) for the black color. Other frames all inherit their pixels from what's already in the_only_x_display. */ if ((!FRAMEP (selected_frame) || !FRAME_LIVE_P (XFRAME (selected_frame))) - && f->output_data.x->background_pixel == 0 - && f->output_data.x->foreground_pixel == 0) + && FRAME_BACKGROUND_PIXEL (f) == 0 + && FRAME_FOREGROUND_PIXEL (f) == 0) { - f->output_data.x->background_pixel = FACE_TTY_DEFAULT_BG_COLOR; - f->output_data.x->foreground_pixel = FACE_TTY_DEFAULT_FG_COLOR; + FRAME_BACKGROUND_PIXEL (f) = FACE_TTY_DEFAULT_BG_COLOR; + FRAME_FOREGROUND_PIXEL (f) = FACE_TTY_DEFAULT_FG_COLOR; } } else diff --git a/src/gtkutil.c b/src/gtkutil.c index b8d37df221..ec886b52fa 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -811,7 +811,7 @@ xg_create_frame_widgets (f) /* Since GTK clears its window by filling with the background color, we must keep X and GTK background in sync. */ - xg_pix_to_gcolor (wfixed, f->output_data.x->background_pixel, &bg); + xg_pix_to_gcolor (wfixed, FRAME_BACKGROUND_PIXEL (f), &bg); gtk_widget_modify_bg (wfixed, GTK_STATE_NORMAL, &bg); /* Also, do not let any background pixmap to be set, this looks very diff --git a/src/macfns.c b/src/macfns.c index 8e241205cd..a6a5e99727 100644 --- a/src/macfns.c +++ b/src/macfns.c @@ -1363,11 +1363,11 @@ x_set_mouse_color (f, arg, oldval) 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) - pixel = x->foreground_pixel; + pixel = FRAME_FOREGROUND_PIXEL (f); f->output_data.mac->mouse_pixel = pixel; @@ -2269,8 +2269,8 @@ x_make_gc (f) = (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)))); #endif diff --git a/src/msdos.c b/src/msdos.c index 9ac34e008c..636ac75d00 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -508,8 +508,8 @@ ScreenVisualBell (void) { /* This creates an xor-mask that will swap the default fore- and background colors. */ - do_visible_bell (((the_only_x_display.foreground_pixel - ^ the_only_x_display.background_pixel) + do_visible_bell (((FRAME_FOREGROUND_PIXEL (SELECTED_FRAME ()) + ^ FRAME_BACKGROUND_PIXEL (SELECTED_FRAME ())) * 0x11) & 0x7f); } #endif @@ -2531,8 +2531,8 @@ internal_terminal_init () initial_screen_colors[0] = initial_screen_colors[1] = -1; bzero (&the_only_x_display, sizeof the_only_x_display); - the_only_x_display.background_pixel = 7; /* White */ - the_only_x_display.foreground_pixel = 0; /* Black */ + FRAME_BACKGROUND_PIXEL (SELECTED_FRAME ()) = 7; /* White */ + FRAME_FOREGROUND_PIXEL (SELECTED_FRAME ()) = 0; /* Black */ bright_bg (); colors = getenv ("EMACSCOLORS"); if (colors && strlen (colors) >= 2) @@ -2543,13 +2543,13 @@ internal_terminal_init () else if (isxdigit (colors[0])) colors[0] -= (isupper (colors[0]) ? 'A' : 'a') - 10; if (colors[0] >= 0 && colors[0] < 16) - the_only_x_display.foreground_pixel = colors[0]; + FRAME_FOREGROUND_PIXEL (SELECTED_FRAME ()) = colors[0]; if (isdigit (colors[1])) colors[1] -= '0'; else if (isxdigit (colors[1])) colors[1] -= (isupper (colors[1]) ? 'A' : 'a') - 10; if (colors[1] >= 0 && colors[1] < 16) - the_only_x_display.background_pixel = colors[1]; + FRAME_BACKGROUND_PIXEL (SELECTED_FRAME ()) = colors[1]; } the_only_x_display.font = (XFontStruct *)1; /* must *not* be zero */ the_only_x_display.display_info.mouse_face_mouse_frame = NULL; diff --git a/src/w32term.c b/src/w32term.c index 53dae452ed..465dc78032 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -5828,8 +5828,8 @@ x_free_frame_resources (f) free_frame_menubar (f); - unload_color (f, f->output_data.x->foreground_pixel); - unload_color (f, f->output_data.x->background_pixel); + unload_color (f, FRAME_FOREGROUND_PIXEL (f)); + unload_color (f, FRAME_BACKGROUND_PIXEL (f)); unload_color (f, f->output_data.w32->cursor_pixel); unload_color (f, f->output_data.w32->cursor_foreground_pixel); unload_color (f, f->output_data.w32->border_pixel); diff --git a/src/xfns.c b/src/xfns.c index c37f99722c..43970439a1 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -2680,7 +2680,7 @@ x_window (f) XSetWindowAttributes attributes; unsigned long attribute_mask; - attributes.background_pixel = f->output_data.x->background_pixel; + attributes.background_pixel = FRAME_BACKGROUND_PIXEL (f); attributes.border_pixel = f->output_data.x->border_pixel; attributes.bit_gravity = StaticGravity; attributes.backing_store = NotUseful; diff --git a/src/xterm.c b/src/xterm.c index 35e70dc220..c8ebc34020 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -4732,7 +4732,7 @@ x_scroll_bar_create (w, top, left, width, height) a.background_pixel = f->output_data.x->scroll_bar_background_pixel; if (a.background_pixel == -1) - a.background_pixel = f->output_data.x->background_pixel; + a.background_pixel = FRAME_BACKGROUND_PIXEL (f); a.event_mask = (ButtonPressMask | ButtonReleaseMask | ButtonMotionMask | PointerMotionHintMask @@ -4906,7 +4906,7 @@ x_scroll_bar_set_handle (bar, start, end, rebuild) /* Restore the foreground color of the GC if we changed it above. */ if (f->output_data.x->scroll_bar_foreground_pixel != -1) XSetForeground (FRAME_X_DISPLAY (f), gc, - f->output_data.x->foreground_pixel); + FRAME_FOREGROUND_PIXEL (f)); /* Draw the empty space below the handle. Note that we can't clear zero-height areas; that means "clear to end of window." */ |