[hackers] [swk] fix glitch drawing first column when colpos=0 || pancake

From: <hg_AT_suckless.org>
Date: Fri, 11 Jun 2010 09:29:50 +0000 (UTC)

changeset: 50:4b4efe4cf012
user: pancake <pancake_AT_nopcode.org>
date: Fri Jun 11 10:52:32 2010 +0200
files: gi_sdl.c swk.c
description:
fix glitch drawing first column when colpos=0
doublemove the column position (sync with Y axis speed)

diff -r 12c8213191f8 -r 4b4efe4cf012 gi_sdl.c
--- a/gi_sdl.c Fri Jun 11 10:46:31 2010 +0200
+++ b/gi_sdl.c Fri Jun 11 10:52:32 2010 +0200
@@ -156,10 +156,12 @@
                         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 -r 12c8213191f8 -r 4b4efe4cf012 swk.c
--- a/swk.c Fri Jun 11 10:46:31 2010 +0200
+++ b/swk.c Fri Jun 11 10:52:32 2010 +0200
@@ -45,6 +45,11 @@
                 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;
Received on Fri Jun 11 2010 - 09:29:50 UTC

This archive was generated by hypermail 2.2.0 : Fri Jun 11 2010 - 09:36:04 UTC