aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey2006-04-01 16:37:26 +0000
committerKaroly Lorentey2006-04-01 16:37:26 +0000
commit5bcee7efff25b675da6da4d6dd31c6bbc822b957 (patch)
treeb898b9ac65601355dc9f7cf018042bdb3591c1ac /src
parentce593f6e6b85e58206264cad983c796ce8dd41a2 (diff)
downloademacs-5bcee7efff25b675da6da4d6dd31c6bbc822b957.tar.gz
emacs-5bcee7efff25b675da6da4d6dd31c6bbc822b957.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/frame.c8
-rw-r--r--src/gtkutil.c2
-rw-r--r--src/macfns.c8
-rw-r--r--src/msdos.c12
-rw-r--r--src/w32term.c4
-rw-r--r--src/xfns.c2
-rw-r--r--src/xterm.c4
7 files changed, 20 insertions, 20 deletions
diff --git a/src/frame.c b/src/frame.c
index e5cd660fbd2..988b1436936 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -588,11 +588,11 @@ make_terminal_frame (struct terminal *terminal)
588 for the black color. Other frames all inherit their pixels 588 for the black color. Other frames all inherit their pixels
589 from what's already in the_only_x_display. */ 589 from what's already in the_only_x_display. */
590 if ((!FRAMEP (selected_frame) || !FRAME_LIVE_P (XFRAME (selected_frame))) 590 if ((!FRAMEP (selected_frame) || !FRAME_LIVE_P (XFRAME (selected_frame)))
591 && f->output_data.x->background_pixel == 0 591 && FRAME_BACKGROUND_PIXEL (f) == 0
592 && f->output_data.x->foreground_pixel == 0) 592 && FRAME_FOREGROUND_PIXEL (f) == 0)
593 { 593 {
594 f->output_data.x->background_pixel = FACE_TTY_DEFAULT_BG_COLOR; 594 FRAME_BACKGROUND_PIXEL (f) = FACE_TTY_DEFAULT_BG_COLOR;
595 f->output_data.x->foreground_pixel = FACE_TTY_DEFAULT_FG_COLOR; 595 FRAME_FOREGROUND_PIXEL (f) = FACE_TTY_DEFAULT_FG_COLOR;
596 } 596 }
597 } 597 }
598 else 598 else
diff --git a/src/gtkutil.c b/src/gtkutil.c
index b8d37df2214..ec886b52faf 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -811,7 +811,7 @@ xg_create_frame_widgets (f)
811 811
812 /* Since GTK clears its window by filling with the background color, 812 /* Since GTK clears its window by filling with the background color,
813 we must keep X and GTK background in sync. */ 813 we must keep X and GTK background in sync. */
814 xg_pix_to_gcolor (wfixed, f->output_data.x->background_pixel, &bg); 814 xg_pix_to_gcolor (wfixed, FRAME_BACKGROUND_PIXEL (f), &bg);
815 gtk_widget_modify_bg (wfixed, GTK_STATE_NORMAL, &bg); 815 gtk_widget_modify_bg (wfixed, GTK_STATE_NORMAL, &bg);
816 816
817 /* Also, do not let any background pixmap to be set, this looks very 817 /* Also, do not let any background pixmap to be set, this looks very
diff --git a/src/macfns.c b/src/macfns.c
index 8e241205cd4..a6a5e99727a 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -1363,11 +1363,11 @@ x_set_mouse_color (f, arg, oldval)
1363 Cursor cursor, nontext_cursor, mode_cursor, hand_cursor; 1363 Cursor cursor, nontext_cursor, mode_cursor, hand_cursor;
1364 Cursor hourglass_cursor, horizontal_drag_cursor; 1364 Cursor hourglass_cursor, horizontal_drag_cursor;
1365 unsigned long pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f)); 1365 unsigned long pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
1366 unsigned long mask_color = x->background_pixel; 1366 unsigned long mask_color = FRAME_BACKGROUND_PIXEL (f);
1367 1367
1368 /* Don't let pointers be invisible. */ 1368 /* Don't let pointers be invisible. */
1369 if (mask_color == pixel) 1369 if (mask_color == pixel)
1370 pixel = x->foreground_pixel; 1370 pixel = FRAME_FOREGROUND_PIXEL (f);
1371 1371
1372 f->output_data.mac->mouse_pixel = pixel; 1372 f->output_data.mac->mouse_pixel = pixel;
1373 1373
@@ -2269,8 +2269,8 @@ x_make_gc (f)
2269 = (XCreatePixmapFromBitmapData 2269 = (XCreatePixmapFromBitmapData
2270 (FRAME_X_DISPLAY (f), FRAME_X_DISPLAY_INFO (f)->root_window, 2270 (FRAME_X_DISPLAY (f), FRAME_X_DISPLAY_INFO (f)->root_window,
2271 gray_bits, gray_width, gray_height, 2271 gray_bits, gray_width, gray_height,
2272 f->output_data.x->foreground_pixel, 2272 FRAME_FOREGROUND_PIXEL (f),
2273 f->output_data.x->background_pixel, 2273 FRAME_BACKGROUND_PIXEL (f),
2274 DefaultDepth (FRAME_X_DISPLAY (f), FRAME_X_SCREEN_NUMBER (f)))); 2274 DefaultDepth (FRAME_X_DISPLAY (f), FRAME_X_SCREEN_NUMBER (f))));
2275#endif 2275#endif
2276 2276
diff --git a/src/msdos.c b/src/msdos.c
index 9ac34e008c4..636ac75d000 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -508,8 +508,8 @@ ScreenVisualBell (void)
508{ 508{
509 /* This creates an xor-mask that will swap the default fore- and 509 /* This creates an xor-mask that will swap the default fore- and
510 background colors. */ 510 background colors. */
511 do_visible_bell (((the_only_x_display.foreground_pixel 511 do_visible_bell (((FRAME_FOREGROUND_PIXEL (SELECTED_FRAME ())
512 ^ the_only_x_display.background_pixel) 512 ^ FRAME_BACKGROUND_PIXEL (SELECTED_FRAME ()))
513 * 0x11) & 0x7f); 513 * 0x11) & 0x7f);
514} 514}
515#endif 515#endif
@@ -2531,8 +2531,8 @@ internal_terminal_init ()
2531 initial_screen_colors[0] = initial_screen_colors[1] = -1; 2531 initial_screen_colors[0] = initial_screen_colors[1] = -1;
2532 2532
2533 bzero (&the_only_x_display, sizeof the_only_x_display); 2533 bzero (&the_only_x_display, sizeof the_only_x_display);
2534 the_only_x_display.background_pixel = 7; /* White */ 2534 FRAME_BACKGROUND_PIXEL (SELECTED_FRAME ()) = 7; /* White */
2535 the_only_x_display.foreground_pixel = 0; /* Black */ 2535 FRAME_FOREGROUND_PIXEL (SELECTED_FRAME ()) = 0; /* Black */
2536 bright_bg (); 2536 bright_bg ();
2537 colors = getenv ("EMACSCOLORS"); 2537 colors = getenv ("EMACSCOLORS");
2538 if (colors && strlen (colors) >= 2) 2538 if (colors && strlen (colors) >= 2)
@@ -2543,13 +2543,13 @@ internal_terminal_init ()
2543 else if (isxdigit (colors[0])) 2543 else if (isxdigit (colors[0]))
2544 colors[0] -= (isupper (colors[0]) ? 'A' : 'a') - 10; 2544 colors[0] -= (isupper (colors[0]) ? 'A' : 'a') - 10;
2545 if (colors[0] >= 0 && colors[0] < 16) 2545 if (colors[0] >= 0 && colors[0] < 16)
2546 the_only_x_display.foreground_pixel = colors[0]; 2546 FRAME_FOREGROUND_PIXEL (SELECTED_FRAME ()) = colors[0];
2547 if (isdigit (colors[1])) 2547 if (isdigit (colors[1]))
2548 colors[1] -= '0'; 2548 colors[1] -= '0';
2549 else if (isxdigit (colors[1])) 2549 else if (isxdigit (colors[1]))
2550 colors[1] -= (isupper (colors[1]) ? 'A' : 'a') - 10; 2550 colors[1] -= (isupper (colors[1]) ? 'A' : 'a') - 10;
2551 if (colors[1] >= 0 && colors[1] < 16) 2551 if (colors[1] >= 0 && colors[1] < 16)
2552 the_only_x_display.background_pixel = colors[1]; 2552 FRAME_BACKGROUND_PIXEL (SELECTED_FRAME ()) = colors[1];
2553 } 2553 }
2554 the_only_x_display.font = (XFontStruct *)1; /* must *not* be zero */ 2554 the_only_x_display.font = (XFontStruct *)1; /* must *not* be zero */
2555 the_only_x_display.display_info.mouse_face_mouse_frame = NULL; 2555 the_only_x_display.display_info.mouse_face_mouse_frame = NULL;
diff --git a/src/w32term.c b/src/w32term.c
index 53dae452edc..465dc780322 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -5828,8 +5828,8 @@ x_free_frame_resources (f)
5828 5828
5829 free_frame_menubar (f); 5829 free_frame_menubar (f);
5830 5830
5831 unload_color (f, f->output_data.x->foreground_pixel); 5831 unload_color (f, FRAME_FOREGROUND_PIXEL (f));
5832 unload_color (f, f->output_data.x->background_pixel); 5832 unload_color (f, FRAME_BACKGROUND_PIXEL (f));
5833 unload_color (f, f->output_data.w32->cursor_pixel); 5833 unload_color (f, f->output_data.w32->cursor_pixel);
5834 unload_color (f, f->output_data.w32->cursor_foreground_pixel); 5834 unload_color (f, f->output_data.w32->cursor_foreground_pixel);
5835 unload_color (f, f->output_data.w32->border_pixel); 5835 unload_color (f, f->output_data.w32->border_pixel);
diff --git a/src/xfns.c b/src/xfns.c
index c37f99722c5..43970439a1a 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -2680,7 +2680,7 @@ x_window (f)
2680 XSetWindowAttributes attributes; 2680 XSetWindowAttributes attributes;
2681 unsigned long attribute_mask; 2681 unsigned long attribute_mask;
2682 2682
2683 attributes.background_pixel = f->output_data.x->background_pixel; 2683 attributes.background_pixel = FRAME_BACKGROUND_PIXEL (f);
2684 attributes.border_pixel = f->output_data.x->border_pixel; 2684 attributes.border_pixel = f->output_data.x->border_pixel;
2685 attributes.bit_gravity = StaticGravity; 2685 attributes.bit_gravity = StaticGravity;
2686 attributes.backing_store = NotUseful; 2686 attributes.backing_store = NotUseful;
diff --git a/src/xterm.c b/src/xterm.c
index 35e70dc220d..c8ebc340202 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -4732,7 +4732,7 @@ x_scroll_bar_create (w, top, left, width, height)
4732 4732
4733 a.background_pixel = f->output_data.x->scroll_bar_background_pixel; 4733 a.background_pixel = f->output_data.x->scroll_bar_background_pixel;
4734 if (a.background_pixel == -1) 4734 if (a.background_pixel == -1)
4735 a.background_pixel = f->output_data.x->background_pixel; 4735 a.background_pixel = FRAME_BACKGROUND_PIXEL (f);
4736 4736
4737 a.event_mask = (ButtonPressMask | ButtonReleaseMask 4737 a.event_mask = (ButtonPressMask | ButtonReleaseMask
4738 | ButtonMotionMask | PointerMotionHintMask 4738 | ButtonMotionMask | PointerMotionHintMask
@@ -4906,7 +4906,7 @@ x_scroll_bar_set_handle (bar, start, end, rebuild)
4906 /* Restore the foreground color of the GC if we changed it above. */ 4906 /* Restore the foreground color of the GC if we changed it above. */
4907 if (f->output_data.x->scroll_bar_foreground_pixel != -1) 4907 if (f->output_data.x->scroll_bar_foreground_pixel != -1)
4908 XSetForeground (FRAME_X_DISPLAY (f), gc, 4908 XSetForeground (FRAME_X_DISPLAY (f), gc,
4909 f->output_data.x->foreground_pixel); 4909 FRAME_FOREGROUND_PIXEL (f));
4910 4910
4911 /* Draw the empty space below the handle. Note that we can't 4911 /* Draw the empty space below the handle. Note that we can't
4912 clear zero-height areas; that means "clear to end of window." */ 4912 clear zero-height areas; that means "clear to end of window." */