From d9416be416758bc2a0da45384590db18680df01c Mon Sep 17 00:00:00 2001 From: Semun Lee Date: Sat, 30 May 2015 14:18:32 +0900 Subject: [PATCH] Activate window for the AUL_RESUME command Activate window for the AUL_RESUME command using ecore_wl_window_activate for supporting wayland. Change-Id: I715408c6b0f34e3f8c077012d5b18b3d02e87829 Signed-off-by: Semun Lee --- include/appcore-internal.h | 1 + src/appcore-efl.c | 9 +++++++++ src/appcore.c | 8 +------- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/include/appcore-internal.h b/include/appcore-internal.h index 1d88353..f4d2ccd 100755 --- a/include/appcore-internal.h +++ b/include/appcore-internal.h @@ -110,6 +110,7 @@ enum app_event { AE_TERMINATE, AE_PAUSE, AE_RESUME, + AE_RAISE, AE_RESET, AE_LOWMEM_POST, AE_MEM_FLUSH, diff --git a/src/appcore-efl.c b/src/appcore-efl.c index 0f9605f..6dfc5a1 100644 --- a/src/appcore-efl.c +++ b/src/appcore-efl.c @@ -256,6 +256,15 @@ static void __do_app(enum app_event event, void *data, bundle * b) return; } + if (event == AE_RAISE) { +#ifdef X11 + x_raise_win(getpid()); +#else + wl_raise_win(); +#endif + return; + } + _ret_if(ui->ops == NULL); switch (event) { diff --git a/src/appcore.c b/src/appcore.c index 305f451..94d3693 100644 --- a/src/appcore.c +++ b/src/appcore.c @@ -198,17 +198,11 @@ static int __app_reset(void *data, bundle * k) static int __app_resume(void *data) { -#ifdef WAYLAND struct appcore *ac = data; - _retv_if(ac == NULL || ac->ops == NULL, -1); _retv_if(ac->ops->cb_app == NULL, 0); - ac->ops->cb_app(AE_RESUME, ac->ops->data, NULL); -#endif -#ifdef X11 - x_raise_win(getpid()); -#endif + ac->ops->cb_app(AE_RAISE, ac->ops->data, NULL); return 0; } -- 2.7.4