raster pushed a commit to branch master.

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

commit 1fe64f8b01d5bcbca9df2e29a71e1629978fb801
Author: Carsten Haitzler <[email protected]>
Date:   Mon Apr 11 12:29:14 2022 +0100

    focus action - raise/unshade/uniconify on focus dir/next/prev action
    
    it's not right that windows stay shaded, iconified or stacked below
    when you use a binding to switch focus like "focus prev" to cycle just
    with a plain key. this fixes that
    
    @fix
---
 src/bin/e_actions.c | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/src/bin/e_actions.c b/src/bin/e_actions.c
index eafa14393..4c0347b29 100644
--- a/src/bin/e_actions.c
+++ b/src/bin/e_actions.c
@@ -3285,15 +3285,18 @@ ACT_FN_GO(window_focus, EINA_UNUSED)
           }
         if (dir == -1) /* next */
           {
-             if (ec_next) e_client_focus_set_with_pointer(ec_next);
-             else if (ec_first) e_client_focus_set_with_pointer(ec_first);
+             if (ec_next) goto do_focus;
+             else if (ec_first) ec_next = ec_first;
+             else return;
           }
         else if (dir == -2)
           {
-             if (ec_prev) e_client_focus_set_with_pointer(ec_prev);
-             else if (ec_last) e_client_focus_set_with_pointer(ec_last);
+             if (ec_prev) ec_next = ec_prev;
+             else if (ec_last) ec_next = ec_last;
+             else return;
           }
-        return;
+        else return;
+        goto do_focus;
      }
 
    cx = ec_orig->x + (ec_orig->w / 2);
@@ -3368,8 +3371,18 @@ ACT_FN_GO(window_focus, EINA_UNUSED)
         ec_next = ec;
         distance = d;
      }
+do_focus:
+   if (!ec_next) return;
 
-   if (ec_next) e_client_focus_set_with_pointer(ec_next);
+   ec = ec_next;
+   if (ec->iconic) e_client_uniconify(ec);
+   if (ec->shaded) e_client_unshade(ec, ec->shade_dir);
+   if (!ec->lock_user_stacking)
+     {
+        evas_object_raise(ec->frame);
+        e_client_raise_latest_set(ec);
+     }
+   e_client_focus_set_with_pointer(ec);
 }
 
 /* local subsystem globals */

-- 


Reply via email to