Changes for automatic remapping of X colors on terminal frames:
[bpt/emacs.git] / src / dispnew.c
index 3d5797d..9cdf01e 100644 (file)
@@ -5915,7 +5915,15 @@ For types not defined in VMS, use  define emacs_term \"TYPE\".\n\
       && (strcmp (terminal_type, "internal") != 0 || inhibit_window_system)
 #endif
       && NILP (Vwindow_system))
-    call0 (intern ("tty-set-up-initial-frame-faces"));
+    {
+      /* For the initial frame, we don't have any way of knowing what
+        are the foreground and background colors of the terminal.  */
+      struct frame *sf = SELECTED_FRAME();
+
+      FRAME_FOREGROUND_PIXEL (sf) = -1;
+      FRAME_BACKGROUND_PIXEL (sf) = -1;
+      call0 (intern ("tty-set-up-initial-frame-faces"));
+    }
 }