discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=24487c52336714333860c0951a5410baddec259d

commit 24487c52336714333860c0951a5410baddec259d
Author: Marcel Hollerbach <marcel-hollerb...@t-online.de>
Date:   Wed Mar 16 15:08:25 2016 +0100

    re-apply xkb layout groups whenever an xkb event occurs
    
    If someone plugs in a external monitor, the notify event is set AND the
    group is changed externally. This means enlightenment cannot configure a
    new keyboard anymore. So we are flushing in our new config all the time,
    setting the old group-index again.
---
 src/bin/e_xkb.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/bin/e_xkb.c b/src/bin/e_xkb.c
index 0878593..1bd7340 100644
--- a/src/bin/e_xkb.c
+++ b/src/bin/e_xkb.c
@@ -33,6 +33,7 @@ _e_xkb_init_timer(void *data)
 static Eina_Bool
 _xkb_changed_state(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
 {
+#if 0
    Ecore_X_Event_Xkb *ev = (Ecore_X_Event_Xkb *)event;
 
    if (ev->group < 0 ||
@@ -40,7 +41,15 @@ _xkb_changed_state(void *data EINA_UNUSED, int type 
EINA_UNUSED, void *event)
      return ECORE_CALLBACK_PASS_ON;
 
    e_config->xkb.cur_group = ev->group;
-   _e_xkb_update_event(ev->group);
+#endif
+   /*
+    * XKb_STATE_NOTIFY does not only indicate a new group setted somewhere in 
e,
+    * it also indicates that there is probebly a new set of available groups 
which is unknown to e
+    * so setting a new groupindex does not mean you have setted to a new group 
from the enlightenment config.
+    * So better reconfigure the enlightenment known configuration and ignore 
the sets from outside of e
+    */
+   _e_xkb_update_event(0);
+   _e_xkb_update_event(e_config->xkb.cur_group);
    return ECORE_CALLBACK_PASS_ON;
 }
 #endif

-- 


Reply via email to