changeset 32668:3bdd8b545352

Do not undef HAVE_WINDOW_SYSTEM before including dispextern.h, as it stops faces from working.
author Jason Rumney <jasonr@gnu.org>
date Thu, 19 Oct 2000 19:06:38 +0000
parents 36e10c03d1d7
children 092d2df2a6c3
files src/w32console.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32console.c	Thu Oct 19 15:42:49 2000 +0000
+++ b/src/w32console.c	Thu Oct 19 19:06:38 2000 +0000
@@ -35,11 +35,11 @@
 #include "coding.h"
 #include "disptab.h"
 #include "termhooks.h"
-/* Disable features in dispextern.h that require a Window System.  */
+#include "dispextern.h"
+/* Disable features in frame.h that require a Window System.  */
 #undef HAVE_WINDOW_SYSTEM
 #include "frame.h"
 #include "w32inevt.h"
-#include "dispextern.h"
 
 #define min(a, b) ((a) < (b) ? (a) : (b))
 
@@ -579,10 +579,12 @@
 
   if (face->background != FACE_TTY_DEFAULT_BG_COLOR
       && face->background != FACE_TTY_DEFAULT_COLOR)
-    char_attr = (char_attr & 0xff0f) + ((face->background % 16) * 16); 
+    char_attr = (char_attr & 0xff0f) + ((face->background % 16) << 4); 
 
 
-  /* Ensure readability (temporary measure until this all works) */
+  /* NTEMACS_TODO: Faces defined during startup get both foreground
+     and background of 0. Need a better way around this - for now detect
+     the problem and invert one of the faces to make the text readable. */
   if (((char_attr & 0x00f0) >> 4) == (char_attr & 0x000f))
     char_attr ^= 0x0007;