summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-05-19 18:41:29 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-05-19 18:45:17 +0100
commit0332991a4d892bc618f2cd3ac71917366cdccc00 (patch)
treec63f6c6e393cebbb17717da8d57fb7f89f6c3dc4
parent86f1e6a00c54a37515b1d3487ef3d9174dc36f38 (diff)
ecore-x - ensure we fully look at all xkb events and refresh all binds
this ensures for sure that we rebind known key/mouse grabs too for xkb mapping changes and force a get of the keymaps too @fix
-rw-r--r--src/lib/ecore_x/ecore_x.c4
-rw-r--r--src/lib/ecore_x/ecore_x_events.c10
2 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/ecore_x/ecore_x.c b/src/lib/ecore_x/ecore_x.c
index 74e50efd01..573322a57f 100644
--- a/src/lib/ecore_x/ecore_x.c
+++ b/src/lib/ecore_x/ecore_x.c
@@ -2540,8 +2540,10 @@ ecore_x_xkb_track_state(void)
2540{ 2540{
2541 Eina_Bool ret = EINA_FALSE; 2541 Eina_Bool ret = EINA_FALSE;
2542#ifdef ECORE_XKB 2542#ifdef ECORE_XKB
2543 unsigned mask = XkbNewKeyboardNotifyMask | XkbMapNotifyMask |
2544 XkbStateNotifyMask | XkbCompatMapNotifyMask;
2543 EINA_SAFETY_ON_NULL_RETURN_VAL(_ecore_x_disp, EINA_FALSE); 2545 EINA_SAFETY_ON_NULL_RETURN_VAL(_ecore_x_disp, EINA_FALSE);
2544 ret = XkbSelectEvents(_ecore_x_disp, XkbUseCoreKbd, XkbStateNotifyMask, XkbStateNotifyMask); 2546 ret = XkbSelectEvents(_ecore_x_disp, XkbUseCoreKbd, mask, mask);
2545 if (_ecore_xlib_sync) ecore_x_sync(); 2547 if (_ecore_xlib_sync) ecore_x_sync();
2546#endif 2548#endif
2547 return ret; 2549 return ret;
diff --git a/src/lib/ecore_x/ecore_x_events.c b/src/lib/ecore_x/ecore_x_events.c
index 637ff0c546..a777b48053 100644
--- a/src/lib/ecore_x/ecore_x_events.c
+++ b/src/lib/ecore_x/ecore_x_events.c
@@ -2511,10 +2511,16 @@ _ecore_x_event_handle_xkb(XEvent *xevent)
2511 2511
2512 if (xkbev->any.xkb_type == XkbMapNotify) 2512 if (xkbev->any.xkb_type == XkbMapNotify)
2513 { 2513 {
2514 XkbMapNotifyEvent *xkbmapping; 2514 XkbMapNotifyEvent *xkbmapping = (XkbMapNotifyEvent *)xkbev;
2515 2515
2516 xkbmapping = (XkbMapNotifyEvent *)xkbev; 2516 _ecore_x_window_grab_suspend();
2517 _ecore_x_key_grab_suspend();
2518 XkbGetMap(_ecore_x_disp, XkbAllMapComponentsMask,
2519 xkbmapping->device);
2517 XkbRefreshKeyboardMapping(xkbmapping); 2520 XkbRefreshKeyboardMapping(xkbmapping);
2521 _ecore_x_modifiers_get();
2522 _ecore_x_window_grab_resume();
2523 _ecore_x_key_grab_resume();
2518 } 2524 }
2519 else 2525 else
2520 { 2526 {