ecore-x: use async pointer grab mode in ecore_x_window_key_grab()

using a sync grab here causes the device to be frozen in the xserver,
preventing any event processing on the device until the grab ends. it also
prevents new grabs, such as the ones which would be created by xkill when
launched from a keybinding; this means that as long as the grabbed key is
held, the pointer is effectively dead to the world.

I attempted to find the reason for using sync pointer grabs here,
but the original commit message was:

  aaaahmmm.. no.. this.. oops

see https://git.enlightenment.org/legacy/ecore.git/commit/?id=f62faeae288fc8211d5f97b43d3b81de87db0942

fix T2228
This commit is contained in:
Mike Blumenkrantz 2015-04-29 21:58:23 -04:00
parent 7c1da6cdfa
commit ae095bb5c5
2 changed files with 2 additions and 2 deletions

View File

@ -1861,7 +1861,7 @@ ecore_x_window_key_grab(Ecore_X_Window win,
for (i = 0; i < 8; i++)
xcb_grab_key(_ecore_xcb_conn, 0, win, m | locks[i],
keycode, XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC);
keycode, XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC);
_ecore_xcb_key_grabs_num++;
t = realloc(_ecore_xcb_key_grabs,
_ecore_xcb_key_grabs_num * sizeof(Ecore_X_Window));

View File

@ -1892,7 +1892,7 @@ _ecore_x_window_key_grab_internal(Ecore_X_Window win,
for (i = 0; i < 8; i++)
{
XGrabKey(_ecore_x_disp, keycode, m | locks[i],
win, False, GrabModeSync, GrabModeAsync);
win, False, GrabModeAsync, GrabModeAsync);
if (_ecore_xlib_sync) ecore_x_sync();
}
}