]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix previous commit.
authorKaroly Lorentey <lorentey@elte.hu>
Sat, 1 Apr 2006 16:37:26 +0000 (16:37 +0000)
committerKaroly Lorentey <lorentey@elte.hu>
Sat, 1 Apr 2006 16:37:26 +0000 (16:37 +0000)
* 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

src/frame.c
src/gtkutil.c
src/macfns.c
src/msdos.c
src/w32term.c
src/xfns.c
src/xterm.c

index e5cd660fbd2790df1875c93203894c24afe55bbb..988b1436936ce806ffef248f0af16423883ad3d5 100644 (file)
@@ -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
index b8d37df22144ad16c4ee364900218e4327b36f48..ec886b52fafe90f6945073829470a03008792a3e 100644 (file)
@@ -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
index 8e241205cd4553c711b3d60ce0d1b05b18d8b10b..a6a5e99727a071ad54a8a7ffb80360f0a1d148ad 100644 (file)
@@ -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
 
index 9ac34e008c4ffb25daa338c1c6f116af6ac86951..636ac75d00044887fac6efcefc987182acfe1097 100644 (file)
@@ -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;
index 53dae452edcf0089829770c388fb2b161eb6a8d0..465dc780322b161ebdc5294f1594d9095b05e138 100644 (file)
@@ -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);
index c37f99722c5de90b80938d5e08044107bbe6cbe0..43970439a1ab2b618e45a392627fb4b1b0d28cc7 100644 (file)
@@ -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;
index 35e70dc220d1b34cea7789bc267e031dfe3cab98..c8ebc3402023d7f65e8b0b3d97a824a14adafd29 100644 (file)
@@ -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." */