static Eina_Bool _pol_cb_desk_show(void *data EINA_UNUSED, int type EINA_UNUSED, void *event);
static Eina_Bool _pol_cb_client_remove(void *data EINA_UNUSED, int type, void *event);
static Eina_Bool _pol_cb_client_add(void *data EINA_UNUSED, int type, void *event);
+static Eina_Bool _pol_cb_client_move(void *data EINA_UNUSED, int type, void *event);
+static Eina_Bool _pol_cb_client_resize(void *data EINA_UNUSED, int type, void *event);
+static Eina_Bool _pol_cb_client_stack(void *data EINA_UNUSED, int type, void *event);
static Eina_Bool _pol_cb_window_property(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Window_Property *ev);
static Eina_Bool _pol_cb_window_configure(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Window_Configure *ev);
}
static Eina_Bool
+_pol_cb_client_move(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
+{
+ E_Event_Client *ev;
+
+ ev = event;
+ if (!ev) return ECORE_CALLBACK_PASS_ON;
+ /* calculate e_client visibility */
+ e_mod_pol_visibility_calc();
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_pol_cb_client_resize(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
+{
+ E_Event_Client *ev;
+
+ ev = event;
+ if (!ev) return ECORE_CALLBACK_PASS_ON;
+ /* calculate e_client visibility */
+ e_mod_pol_visibility_calc();
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
+_pol_cb_client_stack(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
+{
+ E_Event_Client *ev;
+
+ ev = event;
+ if (!ev) return ECORE_CALLBACK_PASS_ON;
+ /* calculate e_client visibility */
+ e_mod_pol_visibility_calc();
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool
_pol_cb_window_property(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Window_Property *ev)
{
if (ev->atom == E_MOD_POL_ATOM_WINDOW_OPAQUE)
_pol_cb_client_remove, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_ADD,
_pol_cb_client_add, NULL);
+ E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_MOVE,
+ _pol_cb_client_move, NULL);
+ E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_RESIZE,
+ _pol_cb_client_resize, NULL);
+ E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_STACK,
+ _pol_cb_client_stack, NULL);
+
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_PROPERTY,
_pol_cb_window_property, NULL);
E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_WINDOW_CONFIGURE,
void
e_mod_pol_zone_visibility_calc(E_Zone *zone)
{
- Eina_List *l;
E_Client *ec;
Eina_Tiler *t;
Eina_Rectangle r;
EINA_RECTANGLE_SET(&r, zone->x, zone->y, zone->w, zone->h);
eina_tiler_rect_add(t, &r);
- EINA_LIST_REVERSE_FOREACH(zone->comp->clients, l, ec)
+ E_CLIENT_REVERSE_FOREACH(zone->comp, ec)
{
+ if (e_object_is_del(E_OBJECT(ec))) continue;
if (e_client_util_ignored_get(ec)) continue;
/* check zone and skip borders not on this zone */
if (ec->zone != zone) continue;
/* check e_client and skip e_clinets not intersects with zone */
if (!E_INTERSECTS(ec->x, ec->y, ec->w, ec->h, zone->x, zone->y, zone->w, zone->h))
continue;
-
+
if (_client_tiler_intersects(ec, t))
- {
+ {
Pol_Win_Opaque *pwo;
Eina_Bool opaque = EINA_FALSE;
/* unobscured case */