parent
40d787ab12
commit
1f799495e4
5 changed files with 28 additions and 13 deletions
|
|
@ -394,12 +394,30 @@ matchmouse(Client *c)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
gfx_mouseresized(Client *c)
|
||||
{
|
||||
gfx_mousetrack(c, -1, -1, -1, -1);
|
||||
}
|
||||
|
||||
void
|
||||
gfx_mousetrack(Client *c, int x, int y, int b, uint ms)
|
||||
{
|
||||
Mouse *m;
|
||||
|
||||
qlock(&c->eventlk);
|
||||
if(x == -1 && y == -1 && b == -1 && ms == -1) {
|
||||
Mouse *copy;
|
||||
// repeat last mouse event for resize
|
||||
if(c->mouse.ri == 0)
|
||||
copy = &c->mouse.m[nelem(c->mouse.m)-1];
|
||||
else
|
||||
copy = &c->mouse.m[c->mouse.ri-1];
|
||||
x = copy->xy.x;
|
||||
y = copy->xy.y;
|
||||
b = copy->buttons;
|
||||
ms = copy->msec;
|
||||
}
|
||||
if(x < c->mouserect.min.x)
|
||||
x = c->mouserect.min.x;
|
||||
if(x > c->mouserect.max.x)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue