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
This commit is contained in:
Mike Blumenkrantz 2015-09-21 19:19:15 -04:00
parent c34e693614
commit e4d065370b
2 changed files with 8 additions and 11 deletions

View File

@ -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;
}

View File

@ -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