#ifdef _F_E_CLIENT_NEW_CLIENT_POST_HOOK_
[E_CLIENT_HOOK_NEW_CLIENT_POST] = NULL,
#endif
+ [E_CLIENT_HOOK_EVAL_VISIBILITY] = NULL,
};
///////////////////////////////////////////
if (ec_vis)
{
/* unobscured case */
- if (ec->visibility.obscured != 0)
+ if (ec->visibility.obscured != E_VISIBILITY_UNOBSCURED)
{
/* previous state is obscured: -1 or 1 */
- ec->visibility.obscured = 0;
+ ec->visibility.obscured = E_VISIBILITY_UNOBSCURED;
+ ec->visibility.changed = 1;
changed = EINA_TRUE;
ELOG("CLIENT VIS ON", ec->pixmap, ec);
}
else
{
/* obscured case */
- if (ec->visibility.obscured != 1)
+ if (ec->visibility.obscured != E_VISIBILITY_FULLY_OBSCURED)
{
/* previous state is unobscured: -1 or 0 */
- ec->visibility.obscured = 1;
+ ec->visibility.obscured = E_VISIBILITY_FULLY_OBSCURED;
+ ec->visibility.changed = 1;
changed = EINA_TRUE;
ELOG("CLIENT VIS OFF", ec->pixmap, ec);
}
if (changed)
_e_client_event_simple(ec, E_EVENT_CLIENT_VISIBILITY_CHANGE);
+
+ _e_client_hook_call(E_CLIENT_HOOK_EVAL_VISIBILITY, ec);
+ ec->visibility.changed = 0;
}
eina_tiler_free(t);
ec->netwm.action.close = 0;
ec->netwm.opacity = 255;
- ec->visibility.obscured = -1;
+ ec->visibility.obscured = E_VISIBILITY_UNKNOWN;
ec->visibility.opaque = -1;
+ ec->visibility.changed = 0;
ec->transform.zoom = 1.0;
ec->transform.angle = 0.0;
} E_Client_Rotation_Type;
#endif
+typedef enum _E_Visibility
+{
+ E_VISIBILITY_UNKNOWN = -1,
+ E_VISIBILITY_UNOBSCURED = 0,
+ E_VISIBILITY_PARTIALLY_OBSCURED = 1,
+ E_VISIBILITY_FULLY_OBSCURED = 2
+} E_Visibility;
+
typedef struct E_Client E_Client;
typedef struct E_Event_Client E_Event_Client;
#ifdef _F_E_CLIENT_NEW_CLIENT_POST_HOOK_
E_CLIENT_HOOK_NEW_CLIENT_POST,
#endif
+ E_CLIENT_HOOK_EVAL_VISIBILITY,
E_CLIENT_HOOK_LAST,
} E_Client_Hook_Point;
{
int opaque;
int obscured;
+ unsigned char changed : 1;
} visibility;
struct