From: Mike Blumenkrantz Date: Tue, 8 Sep 2015 20:55:21 +0000 (-0400) Subject: force-disable refocus during desk flip on client activation X-Git-Tag: upstream/0.20.0~304 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5bd8706bac95e95d9b9d84d9c5956f9ad2049585;p=platform%2Fupstream%2Fenlightenment.git force-disable refocus during desk flip on client activation this prevents an infinite focus loop where focus will be constantly reapplied between multiple windows if the activated window is not the refocus window --- diff --git a/src/bin/e_client.c b/src/bin/e_client.c index e6788ef..8e64150 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -3567,7 +3567,15 @@ e_client_activate(E_Client *ec, Eina_Bool just_do_it) e_client_uniconify(ec); } if ((!ec->iconic) && (!ec->sticky)) - e_desk_show(ec->desk); + { + int val = e_config->focus_last_focused_per_desktop; + + /* prevent infinite focus loops during refocus */ + if (!ec->lock_focus_out) + e_config->focus_last_focused_per_desktop = 0; + e_desk_show(ec->desk); + e_config->focus_last_focused_per_desktop = val; + } if (!ec->lock_user_stacking) evas_object_raise(ec->frame); if (!ec->lock_focus_out)