Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/rasops made rasops_allocattr_color() respect WS_DEFA...



details:   https://anonhg.NetBSD.org/src/rev/55bc08456261
branches:  trunk
changeset: 580631:55bc08456261
user:      macallan <macallan%NetBSD.org@localhost>
date:      Sun May 01 23:19:01 2005 +0000

description:
made rasops_allocattr_color() respect WS_DEFAULT_FG and WS_DEFAULT_BG instead of using white on black

diffstat:

 sys/dev/rasops/rasops.c |  17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diffs (41 lines):

diff -r 917e09525b46 -r 55bc08456261 sys/dev/rasops/rasops.c
--- a/sys/dev/rasops/rasops.c   Sun May 01 22:37:34 2005 +0000
+++ b/sys/dev/rasops/rasops.c   Sun May 01 23:19:01 2005 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: rasops.c,v 1.46 2005/02/27 00:27:47 perry Exp $       */
+/*      $NetBSD: rasops.c,v 1.47 2005/05/01 23:19:01 macallan Exp $    */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,10 +37,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.46 2005/02/27 00:27:47 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.47 2005/05/01 23:19:01 macallan Exp $");
 
 #include "opt_rasops.h"
 #include "rasops_glue.h"
+#include "opt_wsmsgattrs.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -397,8 +398,16 @@
                return (EINVAL);
 
        if ((flg & WSATTR_WSCOLORS) == 0) {
-               fg = WSCOL_WHITE;
-               bg = WSCOL_BLACK;
+               #ifdef WS_DEFAULT_FG
+                       fg = WS_DEFAULT_FG;
+               #else
+                       fg = WSCOL_WHITE;
+               #endif
+               #ifdef WS_DEFAULT_BG
+                       bg = WS_DEFAULT_BG;
+               #else   
+                       bg = WSCOL_BLACK;
+               #endif
        }
 
        if ((flg & WSATTR_REVERSE) != 0) {



Home | Main Index | Thread Index | Old Index