Don't update xkbstate when no app has focus
authorDerek Foreman <derekf@osg.samsung.com>
Fri, 6 Mar 2015 23:55:39 +0000 (18:55 -0500)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Fri, 6 Mar 2015 23:55:39 +0000 (18:55 -0500)
Summary:
We still update the keyboard array.  focus_in adds everything in the
array to xkbstate anyway, so adding it when there's no focus results
in a double update of state and potentially stuck modifiers.

Reviewers: zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2111

src/bin/e_comp_wl.c

index 88b0b9f..c4fa5d5 100644 (file)
@@ -809,11 +809,11 @@ _e_comp_wl_cb_key_down(void *event)
    k = wl_array_add(&cdata->kbd.keys, sizeof(*k));
    *k = keycode;
 
-   /* update modifier state */
-   e_comp_wl_input_keyboard_state_update(cdata, keycode, EINA_TRUE);
-
    if ((ec = e_client_focused_get()))
      {
+        /* update modifier state */
+        e_comp_wl_input_keyboard_state_update(cdata, keycode, EINA_TRUE);
+
         if (ec->comp_data->surface)
           {
              struct wl_client *wc;