+ if (!_grabbed && !_keybgrab_callback.callback) {
+ Window root = otk::display->screenInfo(screen)->rootWindow();
+ //grab should never fail because we should have a sync grab at
+ //this point
+ XGrabKeyboard(**otk::display, root, 0, GrabModeAsync,
+ GrabModeSync, CurrentTime);
+ _grabbed = true;
+ _curpos = p;
+ }
+ XAllowEvents(**otk::display, AsyncKeyboard, CurrentTime);