commit b1a9a45d9ed7db4cbaaff617b7dfd18eb20371cd
parent 717493bcd0cdbce809ed3899590f6abf8f9b6f53
Author: pancake <pancake@nopcode.org>
Date: Fri, 11 Jun 2010 10:52:32 +0200
fix glitch drawing first column when colpos=0
doublemove the column position (sync with Y axis speed)
Diffstat:
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/gi_sdl.c b/gi_sdl.c
@@ -156,10 +156,12 @@ swk_gi_event(SwkWindow *w, int dowait) {
if(event.motion.x>mousedownx+fs) {
mousedownx = event.motion.x;
swk_column_move_right();
+ swk_column_move_right();
} else
if(event.motion.x<mousedownx-fs) {
mousedownx = event.motion.x;
swk_column_move_left();
+ swk_column_move_left();
}
ret->type = EExpose;
ret->data.expose.x = ret->data.expose.y = \
diff --git a/swk.c b/swk.c
@@ -45,6 +45,11 @@ swk_update() {
SwkBox *b = w->boxes[0];
swk_fit(w);
swk_gi_clear();
+ if (!w->colpos) {
+ b = w->boxes[1];
+ count--;
+ col = w->r.w;
+ }
for(w->r.w=col; ; b = w->boxes[1]) {
swk_fit(w);
roy = oy = 0;