From: Jason Rumney Date: Thu, 19 Oct 2000 19:06:38 +0000 (+0000) Subject: Do not undef HAVE_WINDOW_SYSTEM before X-Git-Tag: emacs-pretest-21.0.90~743 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b93b26cbb024384019c3c104623220f34f5caf23;p=emacs.git Do not undef HAVE_WINDOW_SYSTEM before including dispextern.h, as it stops faces from working. --- diff --git a/src/w32console.c b/src/w32console.c index 55adc0dda9a..766a5ddf485 100644 --- a/src/w32console.c +++ b/src/w32console.c @@ -35,11 +35,11 @@ Boston, MA 02111-1307, USA. #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 @@ w32_face_attributes (f, face_id) 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;