From: discomfitor Date: Mon, 13 May 2013 21:27:24 +0000 (+0100) Subject: block pointer warp after desk flip animation if new desk is not in current zone X-Git-Tag: submit/efl/20131021.015651~650 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7d469785d53666703e869893a1c69c06da4b19b5;p=platform%2Fupstream%2Fenlightenment.git block pointer warp after desk flip animation if new desk is not in current zone --- diff --git a/src/bin/e_desk.c b/src/bin/e_desk.c index 4635ff1..1698d1e 100644 --- a/src/bin/e_desk.c +++ b/src/bin/e_desk.c @@ -18,6 +18,8 @@ static void _e_desk_event_desk_window_profile_change_free(void *data, void static void _e_desk_window_profile_change_protocol_set(void); #endif +static Eina_Bool nofocus = EINA_FALSE; + EAPI int E_EVENT_DESK_SHOW = 0; EAPI int E_EVENT_DESK_BEFORE_SHOW = 0; EAPI int E_EVENT_DESK_AFTER_SHOW = 0; @@ -389,7 +391,7 @@ e_desk_last_focused_focus(E_Desk *desk) /* this was the window last focused in this desktop */ if (!bd->lock_focus_out) { - e_border_focus_set_with_pointer(bd); + if (!nofocus) e_border_focus_set_with_pointer(bd); return bd; } } @@ -735,7 +737,21 @@ _e_desk_show_end_serious(E_Desk *desk) (e_config->focus_policy == E_FOCUS_SLOPPY)) { if (e_config->focus_last_focused_per_desktop) - e_desk_last_focused_focus(desk); + { + + if (desk->zone == e_zone_current_get(desk->zone->container)) + e_desk_last_focused_focus(desk); + else + { + /* block pointer warp if desk is not in current zone */ + E_Border *bd; + + nofocus = 1; + bd = e_desk_last_focused_focus(desk); + nofocus = 0; + if (bd) e_border_focus_set(bd, 1, 1); + } + } } else {