discomfitor pushed a commit to branch enlightenment-0.20.

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

commit cba292d9a94e68f587e54f3cf19204f170f24ca1
Author: Derek Foreman <der...@osg.samsung.com>
Date:   Wed Jun 29 16:21:49 2016 -0500

    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.
---
 src/bin/e_comp_wl.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 26090c6..61debb2 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -2261,7 +2261,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);
 

-- 


Reply via email to