discomfitor pushed a commit to branch enlightenment-0.19.

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

commit e4d065370b85d8158abbcbd341d0be25150fbf2a
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Mon Sep 21 19:19:15 2015 -0400

    move focus setting on restart into desk restore function
    
    the focused client on restart needs to be set after desk states
    have been restored in order to avoid focusing the wrong client
---
 src/bin/e_comp_x.c | 11 -----------
 src/bin/e_main.c   |  8 ++++++++
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index b800ac3..3717654 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -5253,17 +5253,6 @@ _e_comp_x_setup(E_Comp *c, Ecore_X_Window root, int w, 
int h)
    e_pointer_type_push(c->pointer, c->pointer, "default");
    _e_comp_x_manage_windows(c);
 
-   {
-      E_Client *ec;
-
-      E_CLIENT_REVERSE_FOREACH(c, ec)
-        if (!e_client_util_ignored_get(ec))
-          {
-             ec->want_focus = ec->take_focus = 1;
-             break;
-          }
-   }
-
    return !!c->bg_blank_object;
 }
 
diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index 521c731..b5e27b2 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -1647,6 +1647,7 @@ _e_main_desk_restore(void)
    E_Comp *c;
    const Eina_List *l, *ll;
    E_Zone *zone;
+   E_Client *ec;
    char *env;
    char name[1024];
 
@@ -1664,6 +1665,13 @@ _e_main_desk_restore(void)
            if (!desk) continue;
            e_desk_show(desk);
         }
+
+   E_CLIENT_REVERSE_FOREACH(e_comp_get(NULL), ec)
+     if ((!e_client_util_ignored_get(ec)) && e_client_util_desk_visible(ec, 
e_desk_current_get(ec->zone)))
+       {
+          ec->want_focus = ec->take_focus = 1;
+          break;
+       }
 }
 
 static void

-- 


Reply via email to