mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
events: warp and center in window pointer when moving with mouse
This commit is contained in:
parent
93310f673d
commit
eabbd371a5
1 changed files with 2 additions and 1 deletions
3
event.c
3
event.c
|
@ -40,7 +40,7 @@
|
|||
#define MOUSEMASK (BUTTONMASK | PointerMotionMask)
|
||||
|
||||
static void
|
||||
movemouse(Client * c, awesome_config *awesomeconf)
|
||||
movemouse(Client *c, awesome_config *awesomeconf)
|
||||
{
|
||||
int x1, y1, ocx, ocy, di, nx, ny;
|
||||
unsigned int dui;
|
||||
|
@ -55,6 +55,7 @@ movemouse(Client * c, awesome_config *awesomeconf)
|
|||
if(XGrabPointer(c->display, RootWindow(c->display, c->phys_screen), False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
|
||||
None, awesomeconf[c->screen].cursor[CurMove], CurrentTime) != GrabSuccess)
|
||||
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);
|
||||
for(;;)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue