events: warp and center in window pointer when moving with mouse
This commit is contained in:
parent
93310f673d
commit
eabbd371a5
1
event.c
1
event.c
|
@ -55,6 +55,7 @@ movemouse(Client * c, awesome_config *awesomeconf)
|
||||||
if(XGrabPointer(c->display, RootWindow(c->display, c->phys_screen), False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
|
if(XGrabPointer(c->display, RootWindow(c->display, c->phys_screen), False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
|
||||||
None, awesomeconf[c->screen].cursor[CurMove], CurrentTime) != GrabSuccess)
|
None, awesomeconf[c->screen].cursor[CurMove], CurrentTime) != GrabSuccess)
|
||||||
return;
|
return;
|
||||||
|
XWarpPointer(c->display, None, c->win, 0, 0, 0, 0, c->w / 2, c->h / 2);
|
||||||
XQueryPointer(c->display, RootWindow(c->display, c->phys_screen), &dummy, &dummy, &x1, &y1, &di, &di, &dui);
|
XQueryPointer(c->display, RootWindow(c->display, c->phys_screen), &dummy, &dummy, &x1, &y1, &di, &di, &dui);
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue