bool ambient_mode;
bool ambient_mode_skip_resume;
bool bg_launch;
- guint pause_timer;
aul_app_com_connection_h conn;
bundle *extra;
void *data;
}
}
-static gboolean __delayed_pause(gpointer data)
-{
- LOGW("Delayed pause");
- __on_ui_base_pause(NULL);
- __context.pause_timer = 0;
- return G_SOURCE_REMOVE;
-}
-
-static void __add_pause_timer(void)
-{
- if (__context.pause_timer == 0) {
- _D("Add pause timer");
- __context.pause_timer = g_timeout_add(200,
- __delayed_pause, NULL);
- }
-}
-
-static void __remove_pause_timer(void)
-{
- if (__context.pause_timer) {
- _D("Remove pause timer");
- g_source_remove(__context.pause_timer);
- __context.pause_timer = 0;
- }
-}
-
static void __on_window_visibility(int type, void *event, void *data)
{
Ecore_Wl2_Event_Window_Visibility_Change *ev = event;
if (ev->fully_obscured) {
__context.watch_visibility = WVS_PAUSE;
- __add_pause_timer();
+ __on_ui_base_pause(NULL);
} else {
__context.watch_visibility = WVS_RESUME;
__context.bg_launch = false;
- __remove_pause_timer();
__on_ui_base_resume(NULL);
}
}