AS_DYING,
};
+enum win_status {
+ WS_NONE,
+ WS_PAUSE,
+ WS_RESUME,
+};
+
typedef struct _appcore_ui_base_context {
appcore_ui_base_ops ops;
void *data;
} appcore_ui_base_context;
-static bool b_active = false;
+static int w_status = WS_NONE;
static bool first_launch = true;
struct win_node {
if (__find_win((unsigned int)ev->win)) {
__delete_win((unsigned int)ev->win);
bvisibility = __check_visible();
- if (!bvisibility && b_active == TRUE) {
+ if (!bvisibility && w_status != WS_PAUSE) {
_DBG(" Go to Pasue state \n");
- b_active = FALSE;
+ w_status = WS_PAUSE;
__do_pause();
}
}
__update_win((unsigned int)ev->win, 0, ev->fully_obscured);
bvisibility = __check_visible();
- _DBG("bvisibility %d, b_active %d", bvisibility, b_active);
+ _DBG("bvisibility %d, w_status %d", bvisibility, w_status);
- if (bvisibility && b_active == FALSE) {
+ if (bvisibility && w_status != WS_RESUME) {
_DBG(" Go to Resume state\n");
- b_active = TRUE;
+ w_status = WS_RESUME;
__do_resume();
- } else if (!bvisibility && b_active == TRUE) {
+ } else if (!bvisibility && w_status != WS_PAUSE) {
_DBG(" Go to Pasue state \n");
- b_active = FALSE;
+ w_status = WS_PAUSE;
__do_pause();
} else {
_DBG(" No change state \n");
__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("bvisibility %d, w_status %d", bvisibility, w_status);
+ if (bvisibility && w_status != WS_RESUME) {
_DBG(" Go to Resume state\n");
- b_active = TRUE;
+ w_status = WS_RESUME;
__do_resume();
}
}