Fix stuck modifiers on client exit
authorDerek Foreman <derekf@osg.samsung.com>
Fri, 6 Mar 2015 18:08:24 +0000 (13:08 -0500)
committerChris Michael <cp.michael@samsung.com>
Fri, 6 Mar 2015 18:08:24 +0000 (13:08 -0500)
Summary:
We still need to remove the active keys when focus_out happens, even
if the pixmap is already gone.  If we don't and a modifier was held
down during exit then the xkb state will have that modifier stuck
forever.

Reviewers: zmike, devilhorns

Subscribers: cedric

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

src/bin/e_comp_wl.c

index ad3a2ee..05f4e14 100644 (file)
@@ -467,11 +467,6 @@ _e_comp_wl_evas_cb_focus_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *ob
    Eina_List *l;
 
    if (!(ec = data)) return;
-   if (e_object_is_del(E_OBJECT(ec))) return;
-   if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
-
-   /* lower client priority */
-   _e_comp_wl_client_priority_normal(ec);
 
    cdata = ec->comp->wl_comp_data;
 
@@ -479,6 +474,12 @@ _e_comp_wl_evas_cb_focus_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *ob
    wl_array_for_each(k, &cdata->kbd.keys)
      e_comp_wl_input_keyboard_state_update(cdata, *k, EINA_FALSE);
 
+   if (e_object_is_del(E_OBJECT(ec))) return;
+   if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
+
+   /* lower client priority */
+   _e_comp_wl_client_priority_normal(ec);
+
    if (!ec->comp_data->surface) return;
 
    /* send keyboard_leave to all keyboard resources */