devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=92fc46cc165ba80010d8a05aad4bfaaab9d488d2

commit 92fc46cc165ba80010d8a05aad4bfaaab9d488d2
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Tue Apr 21 13:42:25 2015 -0400

    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 <cp.mich...@samsung.com>
---
 .../ecore_evas/engines/drm/ecore_evas_drm.c        | 35 ++++++++++++++++++----
 1 file changed, 29 insertions(+), 6 deletions(-)

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 d602f47..6ee3659 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);
 }
 

-- 


Reply via email to