summaryrefslogtreecommitdiff
path: root/gui/input.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-18 13:36:06 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-18 13:36:06 -0300
commitb906af31fb4884cdc399f0e7f8338314c287e49e (patch)
tree8faae9ef016ebe2d21c059a9ad73bd6b81f3860c /gui/input.c
parent2b16358d337dce6a5f5ebea9614184477231bd26 (diff)
downloadeeshow-b906af31fb4884cdc399f0e7f8338314c287e49e.tar.gz
eeshow-b906af31fb4884cdc399f0e7f8338314c287e49e.tar.bz2
eeshow-b906af31fb4884cdc399f0e7f8338314c287e49e.zip
eeshow/gui/input.c (clicked_x, _y): avoid accumulation of conversion errors
Gtk uses floating-point coordinates. The double conversion during dragging (event -> clicked -> difference with next event) caused dragging to "slow down" in the X- and Y- direction.
Diffstat (limited to 'gui/input.c')
-rw-r--r--gui/input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gui/input.c b/gui/input.c
index 1bce70c..45b9474 100644
--- a/gui/input.c
+++ b/gui/input.c
@@ -42,7 +42,7 @@ static struct input {
} *sp = NULL;
static int curr_x, curr_y; /* last mouse position */
-static int clicked_x, clicked_y; /* button down position */
+static double clicked_x, clicked_y; /* button down position */
/* ----- Debugging tools --------------------------------------------------- */