diff options
author | das <das> | 2007-07-02 13:04:26 (GMT) |
---|---|---|
committer | das <das> | 2007-07-02 13:04:26 (GMT) |
commit | 5bfa0bccc1a5e8f01e52c958324ec531befc8b85 (patch) | |
tree | 6f902f042f1705091f78c7de39592ec7355f62f8 /xlib | |
parent | a0cac862ae23ea57529e99345be656caff7db17e (diff) | |
download | tk-5bfa0bccc1a5e8f01e52c958324ec531befc8b85.zip tk-5bfa0bccc1a5e8f01e52c958324ec531befc8b85.tar.gz tk-5bfa0bccc1a5e8f01e52c958324ec531befc8b85.tar.bz2 |
* xlib/xgc.c (XCreateGC): correct black and white pixel values used to
initialize GC foregrund and background fields.
Diffstat (limited to 'xlib')
-rw-r--r-- | xlib/xgc.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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; |