summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-04-21 13:42:25 -0400
committerChris Michael <cp.michael@samsung.com>2015-04-21 13:44:36 -0400
commit92fc46cc165ba80010d8a05aad4bfaaab9d488d2 (patch)
tree6b85daa2f42a148d15d1c4740f72d26affb6d270 /src/modules
parentf7fb534562254b887b19029e0380e6da076982cd (diff)
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.michael@samsung.com>
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/ecore_evas/engines/drm/ecore_evas_drm.c35
1 files 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
698_ecore_evas_drm_show(Ecore_Evas *ee) 698_ecore_evas_drm_show(Ecore_Evas *ee)
699{ 699{
700 if ((!ee) || (ee->visible)) return; 700 if ((!ee) || (ee->visible)) return;
701 evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); 701
702 ee->prop.withdrawn = EINA_FALSE; 702 ee->should_be_visible = 1;
703 if (ee->func.fn_state_change) ee->func.fn_state_change(ee); 703
704 if (ee->prop.avoid_damage)
705 _ecore_evas_drm_render(ee);
706
707 if (ee->prop.override)
708 {
709 ee->prop.withdrawn = EINA_FALSE;
710 if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
711 }
712
713 if (ee->visible) return;
714
704 ee->visible = 1; 715 ee->visible = 1;
716 if (ee->prop.fullscreen)
717 {
718 evas_focus_in(ee->evas);
719 if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee);
720 }
705 if (ee->func.fn_show) ee->func.fn_show(ee); 721 if (ee->func.fn_show) ee->func.fn_show(ee);
706} 722}
707 723
@@ -709,11 +725,18 @@ static void
709_ecore_evas_drm_hide(Ecore_Evas *ee) 725_ecore_evas_drm_hide(Ecore_Evas *ee)
710{ 726{
711 if ((!ee) || (!ee->visible)) return; 727 if ((!ee) || (!ee->visible)) return;
712 evas_sync(ee->evas); 728
713 ee->prop.withdrawn = EINA_TRUE; 729 if (ee->prop.override)
714 if (ee->func.fn_state_change) ee->func.fn_state_change(ee); 730 {
731 ee->prop.withdrawn = EINA_TRUE;
732 if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
733 }
734
735 if (!ee->visible) return;
736
715 ee->visible = 0; 737 ee->visible = 0;
716 ee->should_be_visible = 0; 738 ee->should_be_visible = 0;
739 evas_sync(ee->evas);
717 if (ee->func.fn_hide) ee->func.fn_hide(ee); 740 if (ee->func.fn_hide) ee->func.fn_hide(ee);
718} 741}
719 742