summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-04-29 21:58:23 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-04-29 22:05:44 -0400
commitae095bb5c5e1190d01887e799ea806b4778ef88a (patch)
treecb27f5b5383efe743324afe0a0682e15bb137e00
parent7c1da6cdfa7e4ab7a7374b969a9712c6f9c2f500 (diff)
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
-rw-r--r--src/lib/ecore_x/xcb/ecore_xcb_window.c2
-rw-r--r--src/lib/ecore_x/xlib/ecore_x.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/ecore_x/xcb/ecore_xcb_window.c b/src/lib/ecore_x/xcb/ecore_xcb_window.c
index 8258ef744c..47f58220a6 100644
--- a/src/lib/ecore_x/xcb/ecore_xcb_window.c
+++ b/src/lib/ecore_x/xcb/ecore_xcb_window.c
@@ -1861,7 +1861,7 @@ ecore_x_window_key_grab(Ecore_X_Window win,
1861 1861
1862 for (i = 0; i < 8; i++) 1862 for (i = 0; i < 8; i++)
1863 xcb_grab_key(_ecore_xcb_conn, 0, win, m | locks[i], 1863 xcb_grab_key(_ecore_xcb_conn, 0, win, m | locks[i],
1864 keycode, XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC); 1864 keycode, XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC);
1865 _ecore_xcb_key_grabs_num++; 1865 _ecore_xcb_key_grabs_num++;
1866 t = realloc(_ecore_xcb_key_grabs, 1866 t = realloc(_ecore_xcb_key_grabs,
1867 _ecore_xcb_key_grabs_num * sizeof(Ecore_X_Window)); 1867 _ecore_xcb_key_grabs_num * sizeof(Ecore_X_Window));
diff --git a/src/lib/ecore_x/xlib/ecore_x.c b/src/lib/ecore_x/xlib/ecore_x.c
index c1fb140f33..d1b9896eb9 100644
--- a/src/lib/ecore_x/xlib/ecore_x.c
+++ b/src/lib/ecore_x/xlib/ecore_x.c
@@ -1892,7 +1892,7 @@ _ecore_x_window_key_grab_internal(Ecore_X_Window win,
1892 for (i = 0; i < 8; i++) 1892 for (i = 0; i < 8; i++)
1893 { 1893 {
1894 XGrabKey(_ecore_x_disp, keycode, m | locks[i], 1894 XGrabKey(_ecore_x_disp, keycode, m | locks[i],
1895 win, False, GrabModeSync, GrabModeAsync); 1895 win, False, GrabModeAsync, GrabModeAsync);
1896 if (_ecore_xlib_sync) ecore_x_sync(); 1896 if (_ecore_xlib_sync) ecore_x_sync();
1897 } 1897 }
1898} 1898}