remove E_EVENT_CLIENT_(UN)STICK, use E_EVENT_CLIENT_PROPERTY & E_CLIENT_PROPERTY_STICKY

This commit is contained in:
Mike Blumenkrantz 2014-02-10 20:10:38 -05:00
parent e895d86839
commit 29cd45142a
4 changed files with 11 additions and 14 deletions

View File

@ -14,8 +14,6 @@ EAPI int E_EVENT_CLIENT_SHOW = -1;
EAPI int E_EVENT_CLIENT_HIDE = -1;
EAPI int E_EVENT_CLIENT_ICONIFY = -1;
EAPI int E_EVENT_CLIENT_UNICONIFY = -1;
EAPI int E_EVENT_CLIENT_STICK = -1;
EAPI int E_EVENT_CLIENT_UNSTICK = -1;
EAPI int E_EVENT_CLIENT_STACK = -1;
EAPI int E_EVENT_CLIENT_FOCUS_IN = -1;
EAPI int E_EVENT_CLIENT_FOCUS_OUT = -1;
@ -2163,8 +2161,6 @@ e_client_init(void)
E_EVENT_CLIENT_HIDE = ecore_event_type_new();
E_EVENT_CLIENT_ICONIFY = ecore_event_type_new();
E_EVENT_CLIENT_UNICONIFY = ecore_event_type_new();
E_EVENT_CLIENT_STICK = ecore_event_type_new();
E_EVENT_CLIENT_UNSTICK = ecore_event_type_new();
E_EVENT_CLIENT_STACK = ecore_event_type_new();
E_EVENT_CLIENT_FOCUS_IN = ecore_event_type_new();
E_EVENT_CLIENT_FOCUS_OUT = ecore_event_type_new();
@ -3685,7 +3681,7 @@ e_client_stick(E_Client *ec)
}
}
_e_client_event_simple(ec, E_EVENT_CLIENT_STICK);
_e_client_event_property(ec, E_CLIENT_PROPERTY_STICKY);
e_remember_update(ec);
}
@ -3717,7 +3713,7 @@ e_client_unstick(E_Client *ec)
}
e_comp_object_signal_emit(ec->frame, "e,state,unsticky", "e");
_e_client_event_simple(ec, E_EVENT_CLIENT_UNSTICK);
_e_client_event_property(ec, E_CLIENT_PROPERTY_STICKY);
e_client_desk_set(ec, e_desk_current_get(ec->zone));
e_remember_update(ec);

View File

@ -128,6 +128,7 @@ typedef enum E_Client_Property
E_CLIENT_PROPERTY_URGENCY = (1 << 4),
E_CLIENT_PROPERTY_GRAVITY = (1 << 5),
E_CLIENT_PROPERTY_NETWM_STATE = (1 << 6),
E_CLIENT_PROPERTY_STICKY = (1 << 7),
} E_Client_Property;
typedef struct E_Client E_Client;
@ -713,8 +714,6 @@ EAPI extern int E_EVENT_CLIENT_SHOW;
EAPI extern int E_EVENT_CLIENT_HIDE;
EAPI extern int E_EVENT_CLIENT_ICONIFY;
EAPI extern int E_EVENT_CLIENT_UNICONIFY;
EAPI extern int E_EVENT_CLIENT_STICK;
EAPI extern int E_EVENT_CLIENT_UNSTICK;
EAPI extern int E_EVENT_CLIENT_STACK;
EAPI extern int E_EVENT_CLIENT_FOCUS_IN;
EAPI extern int E_EVENT_CLIENT_FOCUS_OUT;

View File

@ -1113,10 +1113,11 @@ _pager_cb_event_client_uniconify(void *data __UNUSED__, int type __UNUSED__, voi
static Eina_Bool
_pager_cb_event_client_stick(void *data __UNUSED__, int type __UNUSED__, void *event)
{
E_Event_Client *ev = event;
E_Event_Client_Property *ev = event;
Eina_List *l;
Pager *p;
if ((!(ev->property & E_CLIENT_PROPERTY_STICKY)) || (!ev->ec->sticky)) return ECORE_CALLBACK_RENEW;
EINA_LIST_FOREACH(pagers, l, p)
{
Eina_List *l2;
@ -1141,10 +1142,11 @@ _pager_cb_event_client_stick(void *data __UNUSED__, int type __UNUSED__, void *e
static Eina_Bool
_pager_cb_event_client_unstick(void *data __UNUSED__, int type __UNUSED__, void *event)
{
E_Event_Client *ev = event;
E_Event_Client_Property *ev = event;
Eina_List *l;
Pager *p;
if ((!(ev->property & E_CLIENT_PROPERTY_STICKY)) || (ev->ec->sticky)) return ECORE_CALLBACK_RENEW;
EINA_LIST_FOREACH(pagers, l, p)
{
Pager_Desk *pd;
@ -2864,8 +2866,8 @@ e_modapi_init(E_Module *m)
E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_REMOVE, _pager_cb_event_client_remove, NULL);
E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_ICONIFY, _pager_cb_event_client_iconify, NULL);
E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_UNICONIFY, _pager_cb_event_client_uniconify, NULL);
E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_STICK, _pager_cb_event_client_stick, NULL);
E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_UNSTICK, _pager_cb_event_client_unstick, NULL);
E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_PROPERTY, _pager_cb_event_client_stick, NULL);
E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_PROPERTY, _pager_cb_event_client_unstick, NULL);
E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_DESK_SET, _pager_cb_event_client_desk_set, NULL);
E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_STACK, _pager_cb_event_client_stack, NULL);
E_LIST_HANDLER_APPEND(pager_config->handlers, E_EVENT_CLIENT_PROPERTY, _pager_cb_event_client_icon_change, NULL);

View File

@ -3703,8 +3703,8 @@ e_modapi_init(E_Module *m)
HANDLER(_G.handler_client_iconify, CLIENT_ICONIFY, _iconify_hook);
HANDLER(_G.handler_client_uniconify, CLIENT_UNICONIFY, _uniconify_hook);
HANDLER(_G.handler_client_stick, CLIENT_STICK, _stick_hook);
HANDLER(_G.handler_client_unstick, CLIENT_UNSTICK, _unstick_hook);
HANDLER(_G.handler_client_stick, CLIENT_PROPERTY, _stick_hook);
HANDLER(_G.handler_client_unstick, CLIENT_PROPERTY, _unstick_hook);
HANDLER(_G.handler_desk_show, DESK_SHOW, _desk_show_hook);
HANDLER(_G.handler_desk_before_show, DESK_BEFORE_SHOW, _desk_before_show_hook);