mirror of https://github.com/0intro/wmii
double click handling needs to remember x,y of the pointer to have no side-effects
This commit is contained in:
parent
d5b19e9731
commit
62920facc3
|
@ -69,6 +69,7 @@ struct BlitzInput {
|
|||
unsigned int size;
|
||||
unsigned int len;
|
||||
unsigned long tdbclk;
|
||||
int xdbclk, ydbclk;
|
||||
Bool drag;
|
||||
Drawable drawable;
|
||||
Window win;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue