summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordas <das>2007-07-02 13:04:26 (GMT)
committerdas <das>2007-07-02 13:04:26 (GMT)
commitffafac42d2223ae0a476ca5875678140e730095d (patch)
tree6f902f042f1705091f78c7de39592ec7355f62f8
parentee37ce0c65271d0a9fc3ea750b0087b9116329b4 (diff)
downloadtk-ffafac42d2223ae0a476ca5875678140e730095d.zip
tk-ffafac42d2223ae0a476ca5875678140e730095d.tar.gz
tk-ffafac42d2223ae0a476ca5875678140e730095d.tar.bz2
* xlib/xgc.c (XCreateGC): correct black and white pixel values used to
initialize GC foregrund and background fields.
-rw-r--r--xlib/xgc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/xlib/xgc.c b/xlib/xgc.c
index f2aeb2f..6663efc 100644
--- a/xlib/xgc.c
+++ b/xlib/xgc.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: xgc.c,v 1.6.2.3 2007/05/30 06:39:39 das Exp $
+ * RCS: @(#) $Id: xgc.c,v 1.6.2.4 2007/07/02 13:04:26 das Exp $
*/
#include <tkInt.h>
@@ -71,8 +71,10 @@ XCreateGC(display, d, mask, values)
gp->function = (mask & GCFunction) ?values->function :GXcopy;
gp->plane_mask = (mask & GCPlaneMask) ?values->plane_mask :~0;
- gp->foreground = (mask & GCForeground) ?values->foreground :0;
- gp->background = (mask & GCBackground) ?values->background :0xffffff;
+ gp->foreground = (mask & GCForeground) ?values->foreground :
+ BlackPixelOfScreen(DefaultScreenOfDisplay(display));
+ gp->background = (mask & GCBackground) ?values->background :
+ WhitePixelOfScreen(DefaultScreenOfDisplay(display)));
gp->line_width = (mask & GCLineWidth) ?values->line_width :1;
gp->line_style = (mask & GCLineStyle) ?values->line_style :LineSolid;
gp->cap_style = (mask & GCCapStyle) ?values->cap_style :0;