discomfitor pushed a commit to branch master.

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

commit bfbdf5106abe09cefb8d5bdafac09ccb05678ed1
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 9868378..6434485 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -5187,17 +5187,6 @@ _e_comp_x_setup(Ecore_X_Window root, int w, int h)
      e_pointer_window_add(e_comp->pointer, e_comp->root);
    _e_comp_x_manage_windows();
 
-   {
-      E_Client *ec;
-
-      E_CLIENT_REVERSE_FOREACH(ec)
-        if (!e_client_util_ignored_get(ec))
-          {
-             ec->want_focus = ec->take_focus = 1;
-             break;
-          }
-   }
-
    return !!e_comp->bg_blank_object;
 }
 
diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index 041944d..a71abc3 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -1641,6 +1641,7 @@ _e_main_desk_restore(void)
 {
    const Eina_List *l;
    E_Zone *zone;
+   E_Client *ec;
    char *env;
    char name[1024];
 
@@ -1657,6 +1658,13 @@ _e_main_desk_restore(void)
         if (!desk) continue;
         e_desk_show(desk);
      }
+
+   E_CLIENT_REVERSE_FOREACH(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