diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2017-04-13 20:27:00 +0900 |
---|---|---|
committer | Hwankyu Jhun <h.jhun@samsung.com> | 2017-04-19 09:00:29 +0900 |
commit | 33df346d6466f72b0ddaadb0293e7d19a90369f8 (patch) | |
tree | d1a5c6cefa6fae90c7d3a591b36c18bdc0cf0eea | |
parent | 52ffb41eddcdabd8fe0b7524e0f8e1eb9d9110be (diff) | |
download | app-core-33df346d6466f72b0ddaadb0293e7d19a90369f8.tar.gz app-core-33df346d6466f72b0ddaadb0293e7d19a90369f8.tar.bz2 app-core-33df346d6466f72b0ddaadb0293e7d19a90369f8.zip |
Handle window pre visibility change eventsubmit/tizen_3.0/20170522.082647accepted/tizen/3.0/wearable/20170523.235013accepted/tizen/3.0/tv/20170523.235007accepted/tizen/3.0/mobile/20170523.235009accepted/tizen/3.0/ivi/20170523.235016accepted/tizen/3.0/common/20170524.125932
When getting ECORE_WL_WINDOW_VISIBILITY_TYPE_PRE_UNOBSCURED event,
an application is changed to the resume state.
This patch is for backward compatibility.
Change-Id: I1c45e4cde31a6d4de0f25cc617e0d23bb939a476
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rw-r--r-- | src/appcore-efl.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/appcore-efl.c b/src/appcore-efl.c index e98b32b..0091c3d 100644 --- a/src/appcore-efl.c +++ b/src/appcore-efl.c @@ -65,6 +65,7 @@ struct ui_priv { Ecore_Event_Handler *hvchange; #if defined(WAYLAND) Ecore_Event_Handler *hlower; + Ecore_Event_Handler *hpvchange; #endif Ecore_Event_Handler *hcmsg; /* WM_ROTATE */ @@ -887,6 +888,27 @@ static Eina_Bool __visibility_cb(void *data, int type, void *event) } +#if defined(WAYLAND) +static Eina_Bool __pre_visibility_cb(void *data, int type, void *event) +{ + Ecore_Wl_Event_Window_Pre_Visibility_Change *ev = event; + bool bvisibility; + + if (ev && ev->type == ECORE_WL_WINDOW_VISIBILITY_TYPE_PRE_UNOBSCURED) { + __update_win((unsigned int)ev->win, 0, false); + bvisibility = __check_visible(); + _DBG("bvisibility %d, b_active %d", bvisibility, b_active); + if (bvisibility && b_active == FALSE) { + _DBG("Go to Resume state\n"); + b_active = TRUE; + __do_app(AE_RESUME, data, NULL); + } + } + + return ECORE_CALLBACK_RENEW; +} +#endif + #if defined(X11) /* WM_ROTATE */ static Eina_Bool __cmsg_cb(void *data, int type, void *event) @@ -950,6 +972,8 @@ static void __add_climsg_cb(struct ui_priv *ui) ui->hlower = ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_LOWER, __lower_cb, ui); + ui->hpvchange = ecore_event_handler_add(ECORE_WL_EVENT_WINDOW_PRE_VISIBILITY_CHANGE, + __pre_visibility_cb, ui); #elif defined(X11) ui->hshow = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHOW, __show_cb, ui); @@ -1080,6 +1104,8 @@ static void __after_loop(struct ui_priv *ui) #if defined(WAYLAND) if (ui->hlower) ecore_event_handler_del(ui->hlower); + if (ui->hpvchange) + ecore_event_handler_del(ui->hpvchange); #endif __appcore_timer_del(ui); |