derekf pushed a commit to branch master.

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

commit ada8e2deac6665700de257b5f7d3d87707976aef
Author: Derek Foreman <[email protected]>
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 6f2e989..19da021 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);
 

-- 


Reply via email to