diff options
author | Manuel Bachmann <manuel.bachmann@open.eurogiciel.org> | 2014-03-11 17:33:37 +0100 |
---|---|---|
committer | Mikko Ylinen <mikko.ylinen@intel.com> | 2014-04-10 13:03:44 +0300 |
commit | 086ee6790ff4a87bdc1fcab0dbf8c2d673496a80 (patch) | |
tree | 77344153d914298920d6dff1695633afad8141a9 | |
parent | d5761f6d3560bea795bc7025493accf4ead9684c (diff) | |
download | app-core-tizen_ivi_release.tar.gz app-core-tizen_ivi_release.tar.bz2 app-core-tizen_ivi_release.zip |
Fix the pause/resume logicsubmit/tizen_ivi_release/20140410.124431accepted/tizen/ivi/release/20140410.164315tizen_ivi_releaseaccepted/tizen_ivi_release
If we resume an application which has not been paused
before (case of "tizen.application.launch()"), make sure we
pause briefly so the whole logic gets executed.
Change-Id: I687f179ff68752704ef95f4ce9fe41c51fc60039
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
-rw-r--r-- | packaging/app-core.spec | 4 | ||||
-rw-r--r-- | src/appcore-efl.c | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/packaging/app-core.spec b/packaging/app-core.spec index 782d1e4..f60bc52 100644 --- a/packaging/app-core.spec +++ b/packaging/app-core.spec @@ -90,8 +90,8 @@ cp %{SOURCE1001} . %build %cmake . \ -%if %{with wayland} && !%{with x} --Dwith_wayland=TRUE\ +%if %{with wayland} +-Dwith_wayland=ON \ %endif -DENABLE_GTK=OFF diff --git a/src/appcore-efl.c b/src/appcore-efl.c index 8f3d9f3..cc8c89a 100644 --- a/src/appcore-efl.c +++ b/src/appcore-efl.c @@ -389,6 +389,15 @@ static void __do_app(enum app_event event, void *data, bundle * b) case AE_RESUME: LOG(LOG_DEBUG, "LAUNCH", "[%s:Application:resume:start]", ui->name); + /* pause if it hasn't been done before */ + if (ui->state != AS_PAUSED) { + _DBG("[APP %d] PAUSE", _pid); + if (ui->ops->pause) + r = ui->ops->pause(ui->ops->data); + ui->state = AS_PAUSED; + if(r >= 0 && resource_reclaiming == TRUE) + __appcore_timer_add(ui); + } if (ui->state == AS_PAUSED || tmp_val == 1) { _DBG("[APP %d] RESUME", _pid); if (ui->ops->resume) |