warptoclient.c (295B)
1 void 2 warptoclient(Client *c) 3 { 4 int x, y; 5 6 if (!c) { 7 XWarpPointer(dpy, None, root, 0, 0, 0, 0, selmon->wx + selmon->ww/2, selmon->wy + selmon->wh/2); 8 return; 9 } 10 11 x = c->x + WIDTH(c) / 2; 12 y = c->y + HEIGHT(c) / 2; 13 14 XWarpPointer(dpy, None, root, 0, 0, 0, 0, x, y); 15 }