From 43ee45790a18bad360384b27ba91eaa73dfa76d6 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sun, 14 Sep 2014 23:02:46 +0000 Subject: expand worker proc --- Sgraph.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Sgraph.c') diff --git a/Sgraph.c b/Sgraph.c index 5e304ac..427f376 100644 --- a/Sgraph.c +++ b/Sgraph.c @@ -194,11 +194,12 @@ Redisplay(Widget w, XEvent *event, Region r) SgraphWidget sw = (SgraphWidget)w; Dimension width = winwidth / 2; Dimension height = winheight; + static Dimension n; if (!XtIsRealized(w)) return; - warnx("Redisplay"); + //warnx("Redisplay"); XFillRectangle(XtDisplay(sw), XtWindow(sw), sw->sgraph.backGC, BORDER, BORDER, @@ -206,8 +207,9 @@ Redisplay(Widget w, XEvent *event, Region r) XFillRectangle(XtDisplay(sw), XtWindow(sw), sw->sgraph.backGC, width + BORDER, BORDER, width - 2 * BORDER, height - 2 * BORDER); + n = (n + 1) % width; XCopyArea(XtDisplay(sw), sw->sgraph.bg, XtWindow(sw), sw->sgraph.foreGC, - 0, 0, width, height / 4, BORDER, BORDER); + 0, 0, width, height / 4, BORDER + n, BORDER); } static void -- cgit v1.2.3