discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=02af7e8210bf8d939e2a48c577049cb9125e27d4

commit 02af7e8210bf8d939e2a48c577049cb9125e27d4
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Wed Jan 17 17:33:57 2018 -0500

    efl-wl: only send keyboard enter and activation for mapped surfaces
    
    setting active for unmapped surfaces bypasses the expected path for
    unsetting activate during surface unmap if the surface is destroyed
    while active and unmapped
    
    @fix
---
 src/lib/efl_wl/efl_wl.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index 736203938f..da935c3512 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -1249,12 +1249,16 @@ shell_surface_send_configure(Comp_Surface *cs)
      {
         Comp_Surface *ccs;
 
-        comp_seats_redo_enter(cs->c, cs);
+        /* apply activation to already-mapped surface */
+        if (cs->mapped)
+          {
+             comp_seats_redo_enter(cs->c, cs);
+             shell_surface_aspect_update(cs);
+             shell_surface_minmax_update(cs);
+          }
         EINA_INLIST_FOREACH(cs->children, ccs)
           if (ccs->shell.surface && ccs->role && ccs->shell.popup)
             ccs->shell.activated = cs->shell.activated;
-        shell_surface_aspect_update(cs);
-        shell_surface_minmax_update(cs);
      }
    else
      shell_surface_deactivate_recurse(cs);
@@ -1422,6 +1426,13 @@ comp_surface_commit_state(Comp_Surface *cs, 
Comp_Buffer_State *state)
      {
         if (cs->role && (!cs->extracted))
           evas_object_show(cs->obj);
+        /* apply activation to activated surface on map */
+        if (cs->role && cs->shell.surface && cs->shell.activated && 
(!cs->shell.popup))
+          {
+             comp_seats_redo_enter(cs->c, cs);
+             shell_surface_aspect_update(cs);
+             shell_surface_minmax_update(cs);
+          }
      }
 
    if (state->attach && state->buffer)

-- 


Reply via email to