aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2014-10-20 17:31:27 +0000
committerDimitri Sokolyuk <demon@dim13.org>2014-10-20 17:31:27 +0000
commitaf7ec2225f37d80514575fedf92d68c8e99d1051 (patch)
tree56a65326f4642142983860a0689e65e3c336d0d1
parentbf33ea00b27965b2f6915ec2c4dfaff5a444d545 (diff)
split gc creation
-rw-r--r--Sgraph.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/Sgraph.c b/Sgraph.c
index 80f76fc..d6d2b3c 100644
--- a/Sgraph.c
+++ b/Sgraph.c
@@ -107,28 +107,27 @@ GetGC(Widget w)
{
SgraphWidget sw = (SgraphWidget)w;
XGCValues xgcv;
- XtGCMask gc_mask = GCForeground|GCBackground|GCPlaneMask;
+ XtGCMask gc_mask = GCForeground;
Trace(w);
- xgcv.plane_mask = AllPlanes;
+ gc_mask = GCForeground;
xgcv.foreground = sw->core.background_pixel;
- xgcv.background = sw->core.background_pixel;
sw->sgraph.backGC = XtGetGC(w, gc_mask, &xgcv);
+ gc_mask = GCForeground;
xgcv.foreground = sw->sgraph.foreground;
sw->sgraph.foreGC = XtGetGC(w, gc_mask, &xgcv);
#if 1
- gc_mask |= GCClipMask;
+ gc_mask = GCForeground|GCClipMask;
xgcv.clip_mask = sw->sgraph.mask;
sw->sgraph.clipGC = XtGetGC(w, gc_mask, &xgcv);
- gc_mask &= ~GCClipMask;
#endif
+ gc_mask = GCForeground|GCPlaneMask;
xgcv.plane_mask = 1;
xgcv.foreground = 1;
- xgcv.background = 0;
sw->sgraph.maskGC = XtGetGC(w, gc_mask, &xgcv);
}