- Time t = event_curtime;
- if (t != 0 && t < grab_time)
- t = grab_time;
- XUngrabPointer(ob_display, event_curtime);
- }
- ret = TRUE;
- }
- return ret;
-}
-
-gboolean grab_pointer_window(gboolean grab, ObCursor cur, Window win)
-{
- gboolean ret = FALSE;
-
- if (grab) {
- if (pgrabs++ == 0) {
- ret = XGrabPointer(ob_display, win, False, GRAB_PTR_MASK,
- GrabModeAsync, GrabModeAsync, None,
- ob_cursor(cur),
- event_curtime) == Success;
- if (!ret)
- --pgrabs;
- else
- grab_time = event_curtime;
- } else
- ret = TRUE;
- } else if (pgrabs > 0) {
- if (--pgrabs == 0) {
- Time t = event_curtime;
- if (t != 0 && t < grab_time)
- t = grab_time;
- XUngrabPointer(ob_display, event_curtime);