return NULL;
}
+static void
+_pp_win_remove(E_Client *ec)
+{
+ PP_Win *ppw = NULL;
+
+ ppw = _pp_win_find(ec);
+ if (!ppw) return;
+
+ _pp_wins = eina_list_remove(_pp_wins, ppw);
+ _pp_win_del(ppw);
+}
+
static Eina_Bool
_cb_pong_check(void *data)
{
int type EINA_UNUSED,
void *event)
{
- PP_Win *ppw = NULL;
E_Event_Client *ev = (E_Event_Client *)event;
- E_Client *ec = ev->ec;
-
- ppw = _pp_win_find(ec);
- if (!ppw) return ECORE_CALLBACK_PASS_ON;
- _pp_wins = eina_list_remove(_pp_wins, ppw);
- _pp_win_del(ppw);
+ if (ev->ec)
+ _pp_win_remove(ev->ec);
return ECORE_CALLBACK_PASS_ON;
}
int type EINA_UNUSED,
void *event)
{
- PP_Win *ppw = NULL;
E_Event_Client *ev = (E_Event_Client *)event;
- E_Client *ec = ev->ec;
-
- ppw = _pp_win_find(ec);
- if (!ppw) return ECORE_CALLBACK_PASS_ON;
- _pp_wins = eina_list_remove(_pp_wins, ppw);
- _pp_win_del(ppw);
+ if (ev->ec)
+ _pp_win_remove(ev->ec);
return ECORE_CALLBACK_PASS_ON;
}