wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit 62920facc308a23480b85df50f7b78d5d7e401b9
parent d5b19e9731c7df1670bbc028d8508e7cd71880a7
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Tue,  4 Jul 2006 17:41:43 +0200

double click handling needs to remember x,y of the pointer to have no side-effects


Diffstat:
liblitz/blitz.h | 1+
liblitz/input.c | 5++++-
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/liblitz/blitz.h b/liblitz/blitz.h @@ -69,6 +69,7 @@ struct BlitzInput { unsigned int size; unsigned int len; unsigned long tdbclk; + int xdbclk, ydbclk; Bool drag; Drawable drawable; Window win; diff --git a/liblitz/input.c b/liblitz/input.c @@ -225,14 +225,17 @@ blitz_brelease_input(BlitzInput *i, int x, int y, unsigned long time) RevertToPointerRoot, CurrentTime); oend = i->curend; - if(time - i->tdbclk < 1000) { + if((time - i->tdbclk < 1000) && (x == i->xdbclk && y == i->ydbclk)) { mark_word(i, x, y); i->drag = False; i->tdbclk = 0; + i->xdbclk = i->ydbclk = 0; return True; } i->curend = charof(i, x, y); i->tdbclk = time; + i->xdbclk = x; + i->ydbclk = y; i->drag = False; return i->curend == oend;