summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-09-10 20:04:23 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-09-10 20:04:23 +0900
commit933dfca5bcda4943ecdd81ab09dc34989234f7f3 (patch)
tree12eea5c61c11847910d3b84f27817cd4d009c643
parentaa5b83d76aa371e6de4e0a1c45cc31e72646ecdf (diff)
elm - when focus goes back in to a window dont have scrollers jump
there is an annoyance in elm that when focus goes back toa window it restores focus to the last focused widget. if that widget happens to be invisible in a scroller then this is really annoying as the scrollers reset. this makes restoring optional. only if there is a hilight object AND it's visible - then restore, otherwise don't and revert focus to the window itself again. @fix
-rw-r--r--src/lib/elm_win.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 453bb2f31..0ced87af5 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -1084,7 +1084,19 @@ _elm_win_focus_in(Ecore_Evas *ee)
1084 elm_widget_focus_steal(obj); 1084 elm_widget_focus_steal(obj);
1085 } 1085 }
1086 else 1086 else
1087 elm_widget_focus_restore(obj); 1087 {
1088 Evas_Object *newest = NULL;
1089 unsigned int newest_focus_order = 0;
1090
1091 newest = elm_widget_newest_focus_order_get
1092 (obj, &newest_focus_order, EINA_TRUE);
1093 if ((newest) &&
1094 _elm_win_focus_highlight_object_get(obj) &&
1095 _elm_widget_onscreen_is(newest))
1096 elm_widget_focus_restore(obj);
1097 else
1098 evas_object_focus_set(obj, EINA_TRUE);
1099 }
1088 } 1100 }
1089 // FIXME: the event is deprecated but still in use. 1101 // FIXME: the event is deprecated but still in use.
1090 // Has to be removed in EFL2.0 1102 // Has to be removed in EFL2.0