diff options
author | Henrik Rydberg <rydberg@euromail.se> | 2010-05-13 23:21:37 +0200 |
---|---|---|
committer | Henrik Rydberg <rydberg@euromail.se> | 2010-05-14 01:41:39 +0200 |
commit | 32dea71a85ac1b46c35bf85f456f3c4772b30e76 (patch) | |
tree | db546124d028fbe3232d9cc4ab0f5ca63eb48c78 /src | |
parent | 31a96545e433128af34f08a0bb993bbc54e90df1 (diff) |
Hold movement while clicking
In particular for trackpads with integrated button, freezing the mouse
movement while clicking is important for pointer precision. This
patch holds the movement while clicking, obtaining the desired effect.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'src')
-rw-r--r-- | src/gestures.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gestures.c b/src/gestures.c index d061f93..977655c 100644 --- a/src/gestures.c +++ b/src/gestures.c @@ -26,6 +26,8 @@ #include "gestures.h" static const int FINGER_THUMB_MS = 400; +static const int BUTTON_HOLD_MS = 200; + /** * extract_buttons * @@ -49,8 +51,10 @@ static void extract_buttons(struct Gestures *gs, struct MTouch* mt) gs->btdata = btdata; mt->mem.btdata = btdata; } - if (gs->btmask) + if (gs->btmask) { + mt_delay_movement(mt, BUTTON_HOLD_MS); SETBIT(gs->type, GS_BUTTON); + } } /** |