summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2016-06-29 16:21:49 -0500
committerDerek Foreman <derekf@osg.samsung.com>2016-06-29 16:21:49 -0500
commitada8e2deac6665700de257b5f7d3d87707976aef (patch)
treeabf64bf11172347c84c94f16d2a8a4571c58bf12
parent1f44a593c266709803667d114afc6719aa3d84e9 (diff)
downloadenlightenment-ada8e2deac6665700de257b5f7d3d87707976aef.tar.gz
Don't send keyboard leaves to unmapped wayland surfaces
There are actually toolkits that create surfaces, do nothing with them, and destroy them. Sending keyboard leave events for this causes problems. Fixes a bug in handling of some GTK popups.
-rw-r--r--src/bin/e_comp_wl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 6f2e989d75..19da0217fd 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -2382,7 +2382,12 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec)
ec->parent->lock_close = EINA_FALSE;
ec->parent->modal = NULL;
}
- _e_comp_wl_keyboard_leave(ec);
+
+ /* FIXME: We should probably test if ec really has keyboard
+ * focus, but this at least catches GTK's silly habit of creating
+ * a surface, never attaching anything to it, then deleting it.
+ */
+ if (ec->visible)_e_comp_wl_keyboard_leave(ec);
wl_signal_emit(&ec->comp_data->destroy_signal, &ec->comp_data->surface);