From bf33ea00b27965b2f6915ec2c4dfaff5a444d545 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Mon, 20 Oct 2014 00:18:10 +0000 Subject: experiments with GC --- Sgraph.c | 11 ++++++++--- 1 file 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); } -- cgit v1.2.3