From: Chris Michael Date: Tue, 21 Apr 2015 17:42:25 +0000 (-0400) Subject: ecore-evas-drm: Fix issue of fullscreen surfaces not getting focus on show X-Git-Tag: v1.14.0-beta3~54 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92fc46cc165ba80010d8a05aad4bfaaab9d488d2;p=platform%2Fupstream%2Fefl.git ecore-evas-drm: Fix issue of fullscreen surfaces not getting focus on show Summary: This fixed T2349 where elm apps would not get initial focus on show when running via drm. This also addresses the issue of always sending the state_change event even when not an override. NB: Thanks to bu5hm4n for reporting ... and even providing a potential fix ;) @fix Signed-off-by: Chris Michael --- diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c index d602f47194..6ee3659944 100644 --- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c +++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c @@ -698,10 +698,26 @@ static void _ecore_evas_drm_show(Ecore_Evas *ee) { if ((!ee) || (ee->visible)) return; - evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); - ee->prop.withdrawn = EINA_FALSE; - if (ee->func.fn_state_change) ee->func.fn_state_change(ee); + + ee->should_be_visible = 1; + + if (ee->prop.avoid_damage) + _ecore_evas_drm_render(ee); + + if (ee->prop.override) + { + ee->prop.withdrawn = EINA_FALSE; + if (ee->func.fn_state_change) ee->func.fn_state_change(ee); + } + + if (ee->visible) return; + ee->visible = 1; + if (ee->prop.fullscreen) + { + evas_focus_in(ee->evas); + if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee); + } if (ee->func.fn_show) ee->func.fn_show(ee); } @@ -709,11 +725,18 @@ static void _ecore_evas_drm_hide(Ecore_Evas *ee) { if ((!ee) || (!ee->visible)) return; - evas_sync(ee->evas); - ee->prop.withdrawn = EINA_TRUE; - if (ee->func.fn_state_change) ee->func.fn_state_change(ee); + + if (ee->prop.override) + { + ee->prop.withdrawn = EINA_TRUE; + if (ee->func.fn_state_change) ee->func.fn_state_change(ee); + } + + if (!ee->visible) return; + ee->visible = 0; ee->should_be_visible = 0; + evas_sync(ee->evas); if (ee->func.fn_hide) ee->func.fn_hide(ee); }