/** Grab the mouse for choosing a window. */ int GrabMouseForChoose() { int result; result = JXGrabPointer(display, rootWindow, False, ButtonPressMask | ButtonReleaseMask | PointerMotionMask, GrabModeAsync, GrabModeAsync, None, chooseCursor, CurrentTime); if(JLIKELY(result == GrabSuccess)) { return 1; } else { return 0; } }
/** Grab the mouse for choosing a window. */ char GrabMouseForChoose() { int result; unsigned int mask; mask = ButtonPressMask | ButtonReleaseMask | PointerMotionMask; result = JXGrabPointer(display, rootWindow, False, mask, GrabModeAsync, GrabModeAsync, None, cursors[CURSOR_CHOOSE], CurrentTime); if(JLIKELY(result == GrabSuccess)) { mousew = rootWindow; return 1; } else { return 0; } }
/** Grab the mouse for resizing a window. */ int GrabMouseForResize(BorderActionType action) { Cursor cur; int result; cur = GetFrameCursor(action); result = JXGrabPointer(display, rootWindow, False, ButtonPressMask | ButtonReleaseMask | PointerMotionMask, GrabModeAsync, GrabModeAsync, None, cur, CurrentTime); if(JLIKELY(result == GrabSuccess)) { return 1; } else { return 0; } }