discomfitor pushed a commit to branch enlightenment-0.19. http://git.enlightenment.org/core/enlightenment.git/commit/?id=20ef74ccc55fe0410d5633b579bda9f73c082994
commit 20ef74ccc55fe0410d5633b579bda9f73c082994 Author: Mike Blumenkrantz <zm...@osg.samsung.com> Date: Fri Jul 31 13:55:44 2015 -0400 defer focus-setting on focus revert during desk flip when visibility is pending in the case that a client is going to be shown on the next loop iteration, focus setting must still occur and be deferred this fixes the case of a window appearing on a desk while the user is switching desks away from it even though this window is attempting to focus itself --- src/bin/e_desk.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/bin/e_desk.c b/src/bin/e_desk.c index f1cba9b..f4a8d76 100644 --- a/src/bin/e_desk.c +++ b/src/bin/e_desk.c @@ -382,7 +382,7 @@ e_desk_last_focused_focus(E_Desk *desk) EINA_LIST_FOREACH(e_client_focus_stack_get(), l, ec) { - if ((!ec->iconic) && (evas_object_visible_get(ec->frame)) && + if ((!ec->iconic) && (evas_object_visible_get(ec->frame) || ec->changes.visible) && ((ec->desk == desk) || ((ec->zone == desk->zone) && ec->sticky)) && (ec->icccm.accepts_focus || ec->icccm.take_focus) && (ec->netwm.type != E_WINDOW_TYPE_DOCK) && @@ -399,16 +399,22 @@ e_desk_last_focused_focus(E_Desk *desk) ecs = ec; continue; } - e_client_focus_set_with_pointer(ec); + if (ec->changes.visible) + ec->want_focus = ec->take_focus = 1; + else + e_client_focus_set_with_pointer(ec); if (e_config->raise_on_revert_focus) evas_object_raise(ec->frame); return ec; } } } - if (ecs && evas_object_visible_get(ecs->frame)) + if (ecs) { - e_client_focus_set_with_pointer(ecs); + if (ecs->changes.visible) + ecs->want_focus = ecs->take_focus = 1; + else + e_client_focus_set_with_pointer(ecs); if (e_config->raise_on_revert_focus) evas_object_raise(ecs->frame); return ecs; --