Mercurial > emacs
changeset 83505:57e924639750
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: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-545
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sat, 01 Apr 2006 16:37:26 +0000 |
parents | 7aa43f830ce4 |
children | 9905fc171253 |
files | src/frame.c src/gtkutil.c src/macfns.c src/msdos.c src/w32term.c src/xfns.c src/xterm.c |
diffstat | 7 files changed, 20 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/src/frame.c Sat Apr 01 16:11:29 2006 +0000 +++ b/src/frame.c Sat Apr 01 16:37:26 2006 +0000 @@ -588,11 +588,11 @@ 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
--- a/src/gtkutil.c Sat Apr 01 16:11:29 2006 +0000 +++ b/src/gtkutil.c Sat Apr 01 16:37:26 2006 +0000 @@ -811,7 +811,7 @@ /* 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
--- a/src/macfns.c Sat Apr 01 16:11:29 2006 +0000 +++ b/src/macfns.c Sat Apr 01 16:37:26 2006 +0000 @@ -1363,11 +1363,11 @@ 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 @@ = (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
--- a/src/msdos.c Sat Apr 01 16:11:29 2006 +0000 +++ b/src/msdos.c Sat Apr 01 16:37:26 2006 +0000 @@ -508,8 +508,8 @@ { /* 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 @@ 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 @@ 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;
--- a/src/w32term.c Sat Apr 01 16:11:29 2006 +0000 +++ b/src/w32term.c Sat Apr 01 16:37:26 2006 +0000 @@ -5828,8 +5828,8 @@ 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);
--- a/src/xfns.c Sat Apr 01 16:11:29 2006 +0000 +++ b/src/xfns.c Sat Apr 01 16:37:26 2006 +0000 @@ -2680,7 +2680,7 @@ 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;
--- a/src/xterm.c Sat Apr 01 16:11:29 2006 +0000 +++ b/src/xterm.c Sat Apr 01 16:37:26 2006 +0000 @@ -4732,7 +4732,7 @@ 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 @@ /* 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." */