grabpointer.c (400B)
1 /* Copyright ©2007-2010 Kris Maglione <maglione.k at Gmail> 2 * See LICENSE file for license details. 3 */ 4 #include "../x11.h" 5 6 int 7 grabpointer(Window *w, Window *confine, Cursor cur, int mask) { 8 XWindow cw; 9 10 cw = None; 11 if(confine) 12 cw = confine->xid; 13 return XGrabPointer(display, w->xid, false /* owner events */, mask, 14 GrabModeAsync, GrabModeAsync, cw, cur, CurrentTime 15 ) == GrabSuccess; 16 }