changeset: 24:c9bb185814c7
tag: tip
user: pancake <pancake_AT_nopcode.org>
date: Wed Apr 28 03:06:32 2010 +0200
files: swk.c
description:
implement full window contents scroll
diff -r 3a376982a2be -r c9bb185814c7 swk.c
--- a/swk.c Wed Apr 28 02:58:40 2010 +0200
+++ b/swk.c Wed Apr 28 03:06:32 2010 +0200
@@ -23,7 +23,7 @@
void
swk_update(SwkWindow *w) {
- int roy, oy, skip = 0;
+ int roy, oy;
w->_e.type = EExpose;
if(swk_gi_update(w)) {
SwkBox *b = w->boxes;
@@ -77,7 +77,7 @@
b->scroll++;
return;
}
- fprintf(stderr, "Cannot scroll. no vfiller\n");
+ w->boxes->scroll++;
}
void
@@ -88,7 +88,7 @@
b->scroll--;
return;
}
- fprintf(stderr, "Cannot scroll. no vfiller\n");
+ w->boxes->scroll--;
}
static void swk_fit_row(SwkWindow *w, SwkBox *a, SwkBox *b, int y) {
@@ -129,12 +129,12 @@
if(b->r.w==-1 && b->r.h==-1) {
x = (int)(size_t)b->data;
swk_fit_row(w, b2, b, y);
- y+=x-skip+b->scroll;
+ y += x-skip;
// vertical align //
if(x<0) y+=(w->r.h-countrows(b2));
b2 = b+1;
}
- // printf ("%d %d\n", y, b->scroll);
+ y += b->scroll;
}
swk_fit_row(w, b2, b, y);
}
Received on Wed Apr 28 2010 - 01:13:04 UTC
This archive was generated by hypermail 2.2.0 : Wed Apr 28 2010 - 01:24:04 UTC