From af7ec2225f37d80514575fedf92d68c8e99d1051 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Mon, 20 Oct 2014 17:31:27 +0000 Subject: split gc creation --- Sgraph.c | 11 +++++------ 1 file 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); } -- cgit v1.2.3