aboutsummaryrefslogtreecommitdiff
path: root/Sgraph.c
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2014-09-14 23:02:46 +0000
committerDimitri Sokolyuk <demon@dim13.org>2014-09-14 23:02:46 +0000
commit43ee45790a18bad360384b27ba91eaa73dfa76d6 (patch)
treee5e36b94aed73cdd83013e866cdf75be5588799a /Sgraph.c
parent04dfbe4e1b0470ef59c9e414baadc77f11aacbf6 (diff)
expand worker proc
Diffstat (limited to 'Sgraph.c')
-rw-r--r--Sgraph.c6
1 files changed, 4 insertions, 2 deletions
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