WS_RESUME,
};
+enum visibility_type {
+ VT_NONE,
+ VT_UNOBSCURED,
+ VT_FULLY_OBSCURED,
+};
+
typedef struct _appcore_ui_base_context {
appcore_ui_base_ops ops;
void *data;
struct win_node {
unsigned int win;
unsigned int surf;
- bool bfobscured;
+ int vis;
};
static GSList *g_winnode_list;
t->win = win;
t->surf = surf;
- t->bfobscured = FALSE;
+ t->vis = VT_NONE;
g_winnode_list = g_slist_append(g_winnode_list, t);
return TRUE;
}
-static bool __update_win(unsigned int win, unsigned int surf, bool bfobscured)
+static bool __update_win(unsigned int win, unsigned int surf, int vis)
{
GSList *f;
struct win_node *t;
- _DBG("[EVENT_TEST][EVENT] __update_win WIN:%x fully_obscured %d\n", win,
- bfobscured);
+ _DBG("[EVENT_TEST][EVENT] __update_win WIN:%x visibility %d\n",
+ win, vis);
f = __find_win(win);
if (!f) {
t->win = win;
if (surf != 0)
t->surf = surf;
- t->bfobscured = bfobscured;
+ if (vis != VT_NONE)
+ t->vis = vis;
return TRUE;
}
return;
}
- _DBG("[EVENT_TEST][EVENT] GET SHOW EVENT!!!. WIN:%x, %d\n", ev->win, ev->data[0]);
+ _DBG("[EVENT_TEST][EVENT] GET SHOW EVENT!!!. WIN:%x, %d\n",
+ ev->win, ev->data[0]);
- if (!__find_win((unsigned int)ev->win))
+ if (!__find_win((unsigned int)ev->win)) {
__add_win((unsigned int)ev->win, (unsigned int)ev->data[0]);
- else
- __update_win((unsigned int)ev->win, (unsigned int)ev->data[0], FALSE);
+ } else {
+ __update_win((unsigned int)ev->win, (unsigned int)ev->data[0],
+ VT_NONE);
+ }
if (ev->data[0] != 0)
__group_attach();
for (iter = g_winnode_list; iter != NULL; iter = g_slist_next(iter)) {
entry = iter->data;
- _DBG("win : %x obscured : %d\n", entry->win, entry->bfobscured);
- if (entry->bfobscured == FALSE)
+ _DBG("win : %x visibility : %d\n", entry->win, entry->vis);
+ if (entry->vis == VT_UNOBSCURED)
return true;
}
int bvisibility;
ev = event;
- __update_win((unsigned int)ev->win, 0, ev->fully_obscured);
+ __update_win((unsigned int)ev->win, 0,
+ ev->fully_obscured ? VT_FULLY_OBSCURED : VT_UNOBSCURED);
bvisibility = __check_visible();
_DBG("bvisibility %d, w_status %d", bvisibility, w_status);
bool bvisibility;
if (ev && ev->type == ECORE_WL2_WINDOW_VISIBILITY_TYPE_PRE_UNOBSCURED) {
- __update_win((unsigned int)ev->win, 0, false);
+ __update_win((unsigned int)ev->win, 0, VT_UNOBSCURED);
bvisibility = __check_visible();
_DBG("bvisibility %d, w_status %d", bvisibility, w_status);