aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/efl_ui_win.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-06-14 18:03:32 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-06-14 18:15:00 +0900
commitf156737e8f8f096b5a0dda1a41698c5dbc46949b (patch)
tree7c7afa51ee7c7b35af9e7958694a075a35e0b6a6 /src/lib/elementary/efl_ui_win.c
parentevas_generic_loaders: port poppler to the cpp api (diff)
downloadefl-f156737e8f8f096b5a0dda1a41698c5dbc46949b.tar.gz
elm - loop auto throttle - only do this once a window has been shown etc
only start throttling ocne we have a window and it has rendered or been focused or mouse has gone in - then we are surely really visible and sane and only start throttling if no windows are visible then. if auto throttle is on this can improve startup time by the trottle amount
Diffstat (limited to 'src/lib/elementary/efl_ui_win.c')
-rw-r--r--src/lib/elementary/efl_ui_win.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index b2d0b728cd..a037fc5d17 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -317,6 +317,7 @@ static const Elm_Action key_actions[] = {
Eina_List *_elm_win_list = NULL;
int _elm_win_deferred_free = 0;
+static Eina_Bool _elm_win_throttle_ok = EINA_FALSE;
static int _elm_win_count = 0;
static Eina_Bool _elm_win_auto_throttled = EINA_FALSE;
@@ -488,7 +489,7 @@ _elm_win_state_eval(void *data EINA_UNUSED)
throttle = EINA_TRUE;
if (_elm_win_count == 0)
{
- if (_elm_win_auto_throttled)
+ if ((_elm_win_throttle_ok) && (_elm_win_auto_throttled))
{
_elm_process_state = ELM_PROCESS_STATE_FOREGROUND;
ecore_event_add(ELM_EVENT_PROCESS_FOREGROUND, NULL, NULL, NULL);
@@ -507,7 +508,7 @@ _elm_win_state_eval(void *data EINA_UNUSED)
}
if (_elm_win_count_shown <= 0)
{
- if (!_elm_win_auto_throttled)
+ if ((_elm_win_throttle_ok) && (!_elm_win_auto_throttled))
{
_elm_process_state = ELM_PROCESS_STATE_BACKGROUND;
ecore_event_add(ELM_EVENT_PROCESS_BACKGROUND, NULL, NULL, NULL);
@@ -518,7 +519,7 @@ _elm_win_state_eval(void *data EINA_UNUSED)
}
else
{
- if (_elm_win_auto_throttled)
+ if ((_elm_win_throttle_ok) && (_elm_win_auto_throttled))
{
_elm_process_state = ELM_PROCESS_STATE_FOREGROUND;
ecore_event_add(ELM_EVENT_PROCESS_FOREGROUND, NULL, NULL, NULL);
@@ -884,6 +885,7 @@ _elm_win_pre_render(Ecore_Evas *ee)
Efl_Ui_Win_Data *sd = _elm_win_associate_get(ee);
if (!sd) return;
+ _elm_win_throttle_ok = EINA_TRUE;
if (sd->deferred_resize_job)
_elm_win_resize_job(sd->obj);
}
@@ -903,6 +905,7 @@ _elm_win_mouse_in(Ecore_Evas *ee)
Efl_Ui_Win_Data *sd = _elm_win_associate_get(ee);
if (!sd) return;
+ _elm_win_throttle_ok = EINA_TRUE;
if (sd->resizing) sd->resizing = EINA_FALSE;
#ifdef HAVE_ELEMENTARY_WL2
if (sd->wl.win)
@@ -1122,6 +1125,7 @@ _elm_win_focus_in(Ecore_Evas *ee)
if ((!sd) || (sd->modal_count)) return;
+ _elm_win_throttle_ok = EINA_TRUE;
obj = sd->obj;
_elm_widget_top_win_focused_set(obj, EINA_TRUE);
@@ -1762,6 +1766,7 @@ _elm_win_evas_render_pre(void *data,
{
Eo *win = data;
+ _elm_win_throttle_ok = EINA_TRUE;
eo_event_callback_call(win, EFL_CANVAS_EVENT_RENDER_PRE, NULL);
}
@@ -1773,6 +1778,7 @@ _elm_win_evas_focus_in(void *data,
{
Eo *win = data;
+ _elm_win_throttle_ok = EINA_TRUE;
eo_event_callback_call(win, EFL_CANVAS_EVENT_FOCUS_IN, NULL);
}
@@ -1796,6 +1802,7 @@ _elm_win_evas_object_focus_in(void *data,
Eo *object = event_info;
Eo *win = data;
+ _elm_win_throttle_ok = EINA_TRUE;
eo_event_callback_call(win, EFL_CANVAS_EVENT_OBJECT_FOCUS_IN, object);
}