forked from enlightenment/efl
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
This commit is contained in:
parent
a030859f67
commit
323eb9fcff
|
@ -2540,8 +2540,10 @@ ecore_x_xkb_track_state(void)
|
||||||
{
|
{
|
||||||
Eina_Bool ret = EINA_FALSE;
|
Eina_Bool ret = EINA_FALSE;
|
||||||
#ifdef ECORE_XKB
|
#ifdef ECORE_XKB
|
||||||
|
unsigned mask = XkbNewKeyboardNotifyMask | XkbMapNotifyMask |
|
||||||
|
XkbStateNotifyMask | XkbCompatMapNotifyMask;
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(_ecore_x_disp, EINA_FALSE);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(_ecore_x_disp, EINA_FALSE);
|
||||||
ret = XkbSelectEvents(_ecore_x_disp, XkbUseCoreKbd, XkbStateNotifyMask, XkbStateNotifyMask);
|
ret = XkbSelectEvents(_ecore_x_disp, XkbUseCoreKbd, mask, mask);
|
||||||
if (_ecore_xlib_sync) ecore_x_sync();
|
if (_ecore_xlib_sync) ecore_x_sync();
|
||||||
#endif
|
#endif
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -2511,10 +2511,16 @@ _ecore_x_event_handle_xkb(XEvent *xevent)
|
||||||
|
|
||||||
if (xkbev->any.xkb_type == XkbMapNotify)
|
if (xkbev->any.xkb_type == XkbMapNotify)
|
||||||
{
|
{
|
||||||
XkbMapNotifyEvent *xkbmapping;
|
XkbMapNotifyEvent *xkbmapping = (XkbMapNotifyEvent *)xkbev;
|
||||||
|
|
||||||
xkbmapping = (XkbMapNotifyEvent *)xkbev;
|
_ecore_x_window_grab_suspend();
|
||||||
|
_ecore_x_key_grab_suspend();
|
||||||
|
XkbGetMap(_ecore_x_disp, XkbAllMapComponentsMask,
|
||||||
|
xkbmapping->device);
|
||||||
XkbRefreshKeyboardMapping(xkbmapping);
|
XkbRefreshKeyboardMapping(xkbmapping);
|
||||||
|
_ecore_x_modifiers_get();
|
||||||
|
_ecore_x_window_grab_resume();
|
||||||
|
_ecore_x_key_grab_resume();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue