aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2014-10-20 00:18:10 +0000
committerDimitri Sokolyuk <demon@dim13.org>2014-10-20 00:18:10 +0000
commitbf33ea00b27965b2f6915ec2c4dfaff5a444d545 (patch)
tree94161a87ce9736468906a2c8c4f472a579e17553
parentf549aec7a66064e9c803b2289fc404ad71d5fc7f (diff)
experiments with GC
-rw-r--r--Sgraph.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/Sgraph.c b/Sgraph.c
index be43eda..80f76fc 100644
--- a/Sgraph.c
+++ b/Sgraph.c
@@ -112,9 +112,8 @@ GetGC(Widget w)
Trace(w);
xgcv.plane_mask = AllPlanes;
- xgcv.background = sw->core.background_pixel;
-
xgcv.foreground = sw->core.background_pixel;
+ xgcv.background = sw->core.background_pixel;
sw->sgraph.backGC = XtGetGC(w, gc_mask, &xgcv);
xgcv.foreground = sw->sgraph.foreground;
@@ -124,10 +123,12 @@ GetGC(Widget w)
gc_mask |= GCClipMask;
xgcv.clip_mask = sw->sgraph.mask;
sw->sgraph.clipGC = XtGetGC(w, gc_mask, &xgcv);
-
gc_mask &= ~GCClipMask;
#endif
+
xgcv.plane_mask = 1;
+ xgcv.foreground = 1;
+ xgcv.background = 0;
sw->sgraph.maskGC = XtGetGC(w, gc_mask, &xgcv);
}
@@ -146,6 +147,9 @@ Initialize(Widget request, Widget w, ArgList args, Cardinal *nargs)
sw->core.width = 320;
sw->core.height = 120;
+
+ sw->sgraph.bg = None;
+ sw->sgraph.mask = None;
}
static void
@@ -161,6 +165,7 @@ Realize(Widget w, XtValueMask *mask, XSetWindowAttributes *attr)
XtSuperclass(w)->core_class.realize(w, mask, attr);
sw->sgraph.backBuf = XdbeAllocateBackBufferName(XtDisplay(w),
XtWindow(w), XdbeBackground);
+
Resize(w);
}