eina_stringshare_replace(&ec->icccm.class, NULL);
#endif
eina_stringshare_replace(&ec->icccm.title, NULL);
- eina_stringshare_replace(&ec->icccm.icon_name, NULL);
- eina_stringshare_replace(&ec->icccm.machine, NULL);
eina_stringshare_replace(&ec->icccm.window_role, NULL);
- if ((ec->icccm.command.argc > 0) && (ec->icccm.command.argv))
- {
- int i;
-
- for (i = 0; i < ec->icccm.command.argc; i++)
- free(ec->icccm.command.argv[i]);
- E_FREE(ec->icccm.command.argv);
- }
eina_stringshare_replace(&ec->netwm.name, NULL);
eina_stringshare_replace(&ec->internal_icon, NULL);
eina_stringshare_replace(&ec->internal_icon_key, NULL);
#else
ec->icccm.class = NULL;
#endif
- ec->icccm.icon_name = NULL;
- ec->icccm.machine = NULL;
ec->icccm.min_w = 1;
ec->icccm.min_h = 1;
ec->icccm.max_w = 32767;
ec->icccm.max_h = 32767;
- ec->icccm.base_w = 0;
- ec->icccm.base_h = 0;
- ec->icccm.step_w = -1;
- ec->icccm.step_h = -1;
- ec->icccm.min_aspect = 0.0;
- ec->icccm.max_aspect = 0.0;
ec->netwm.pid = 0;
ec->netwm.name = NULL;
if (e_object_ref_get(E_OBJECT(focused_ec)) > 0)
{
_e_client_event_simple(focused_ec, E_EVENT_CLIENT_FOCUS_OUT);
- e_client_urgent_set(focused_ec, focused_ec->icccm.urgent);
}
}
}
return priv->hide_by_request;
}
-EINTERN void
-e_client_urgent_set(E_Client *ec, Eina_Bool urgent)
-{
- E_OBJECT_CHECK(ec);
- E_OBJECT_TYPE_CHECK(ec, E_CLIENT_TYPE);
-
- urgent = !!urgent;
- if (urgent == ec->urgent) return;
- _e_client_event_property(ec, E_CLIENT_PROPERTY_URGENCY);
- if (urgent && (!ec->focused) && (!ec->want_focus))
- {
- e_comp_object_signal_emit(ec->frame, "e,state,urgent", "e");
- ec->urgent = urgent;
- }
- else
- {
- e_comp_object_signal_emit(ec->frame, "e,state,not_urgent", "e");
- ec->urgent = 0;
- }
-}
-
///////////////////////////////////////
EINTERN void
EINTERN void
e_client_resize_limit(E_Client *ec, int *w, int *h)
{
- double a;
- Eina_Bool inc_h;
-
E_OBJECT_CHECK(ec);
E_OBJECT_TYPE_CHECK(ec, E_CLIENT_TYPE);
- inc_h = (*h - ec->h > 0);
if (ec->frame)
e_comp_object_frame_wh_unadjust(ec->frame, *w, *h, w, h);
if (*h < 1) *h = 1;
if (*w < 1) *w = 1;
- if ((ec->icccm.base_w >= 0) &&
- (ec->icccm.base_h >= 0))
- {
- int tw, th;
-
- tw = *w - ec->icccm.base_w;
- th = *h - ec->icccm.base_h;
- if (tw < 1) tw = 1;
- if (th < 1) th = 1;
- a = (double)(tw) / (double)(th);
- if ((ec->icccm.min_aspect != 0.0) &&
- (a < ec->icccm.min_aspect))
- {
- if (inc_h)
- tw = th * ec->icccm.min_aspect;
- else
- th = tw / ec->icccm.max_aspect;
- *w = tw + ec->icccm.base_w;
- *h = th + ec->icccm.base_h;
- }
- else if ((ec->icccm.max_aspect != 0.0) &&
- (a > ec->icccm.max_aspect))
- {
- tw = th * ec->icccm.max_aspect;
- *w = tw + ec->icccm.base_w;
- }
- }
- else
- {
- a = (double)*w / (double)*h;
- if ((ec->icccm.min_aspect != 0.0) &&
- (a < ec->icccm.min_aspect))
- {
- if (inc_h)
- *w = *h * ec->icccm.min_aspect;
- else
- *h = *w / ec->icccm.min_aspect;
- }
- else if ((ec->icccm.max_aspect != 0.0) &&
- (a > ec->icccm.max_aspect))
- *w = *h * ec->icccm.max_aspect;
- }
- if (ec->icccm.step_w > 0)
- {
- if (ec->icccm.base_w >= 0)
- *w = ec->icccm.base_w +
- (((*w - ec->icccm.base_w) / ec->icccm.step_w) *
- ec->icccm.step_w);
- else
- *w = ec->icccm.min_w +
- (((*w - ec->icccm.min_w) / ec->icccm.step_w) *
- ec->icccm.step_w);
- }
- if (ec->icccm.step_h > 0)
- {
- if (ec->icccm.base_h >= 0)
- *h = ec->icccm.base_h +
- (((*h - ec->icccm.base_h) / ec->icccm.step_h) *
- ec->icccm.step_h);
- else
- *h = ec->icccm.min_h +
- (((*h - ec->icccm.min_h) / ec->icccm.step_h) *
- ec->icccm.step_h);
- }
-
- if (*h < 1) *h = 1;
- if (*w < 1) *w = 1;
if ((ec->icccm.max_w > 0) && (*w > ec->icccm.max_w)) *w = ec->icccm.max_w;
else if (*w < ec->icccm.min_w)
#else
Eina_Stringshare *class;
#endif
- Eina_Stringshare *icon_name;
- Eina_Stringshare *machine;
+ EINA_DEPRECATED Eina_Stringshare *icon_name;
+ EINA_DEPRECATED Eina_Stringshare *machine;
int min_w, min_h;
int max_w, max_h;
- int base_w, base_h;
- int step_w, step_h;
- int start_x, start_y;
- double min_aspect, max_aspect;
- Ecore_Window icon_window;
- Ecore_Window window_group;
+ EINA_DEPRECATED int base_w, base_h;
+ EINA_DEPRECATED int step_w, step_h;
+ EINA_DEPRECATED int start_x, start_y;
+ EINA_DEPRECATED double min_aspect, max_aspect;
+ EINA_DEPRECATED Ecore_Window icon_window;
+ EINA_DEPRECATED Ecore_Window window_group;
Ecore_Window transient_for;
- Ecore_Window client_leader;
+ EINA_DEPRECATED Ecore_Window client_leader;
Eina_Stringshare *window_role;
unsigned char take_focus : 1;
unsigned char accepts_focus : 1;
- unsigned char urgent : 1;
+ EINA_DEPRECATED unsigned char urgent : 1;
unsigned char delete_request : 1;
- unsigned char request_pos : 1;
- struct
+ EINA_DEPRECATED unsigned char request_pos : 1;
+ EINA_DEPRECATED struct
{
int argc;
char **argv;
} command;
struct
{
- unsigned char title : 1;
- unsigned char name_class : 1;
- unsigned char icon_name : 1;
- unsigned char machine : 1;
- unsigned char hints : 1;
- unsigned char size_pos_hints : 1;
- unsigned char protocol : 1;
+ EINA_DEPRECATED unsigned char title : 1;
+ EINA_DEPRECATED unsigned char name_class : 1;
+ EINA_DEPRECATED unsigned char icon_name : 1;
+ EINA_DEPRECATED unsigned char machine : 1;
+ EINA_DEPRECATED unsigned char hints : 1;
+ EINA_DEPRECATED unsigned char size_pos_hints : 1;
+ EINA_DEPRECATED unsigned char protocol : 1;
unsigned char transient_for : 1;
- unsigned char client_leader : 1;
- unsigned char window_role : 1;
- unsigned char state : 1;
- unsigned char command : 1;
+ EINA_DEPRECATED unsigned char client_leader : 1;
+ EINA_DEPRECATED unsigned char window_role : 1;
+ EINA_DEPRECATED unsigned char state : 1;
+ EINA_DEPRECATED unsigned char command : 1;
} fetch;
} icccm;
E_API Eina_Bool e_client_is_iconified_by_client(E_Client *ec);
EINTERN void e_client_hide_by_request_set(E_Client *ec, Eina_Bool set);
EINTERN Eina_Bool e_client_hide_by_request_get(E_Client *ec);
-EINTERN void e_client_urgent_set(E_Client *ec, Eina_Bool urgent);
EINTERN void e_client_stick(E_Client *ec);
EINTERN void e_client_unstick(E_Client *ec);
EINTERN void e_client_pinned_set(E_Client *ec, Eina_Bool set);
E_Input_Rect_Smart_Data *input_rect_sd;
E_Comp_Match *m;
Eina_Stringshare *reshadow_group = NULL;
- Eina_Bool focus = EINA_FALSE, urgent = EINA_FALSE, skip = EINA_FALSE, fast = EINA_FALSE, reshadow = EINA_FALSE, no_shadow = EINA_FALSE, pass_event_flag = EINA_FALSE;
+ Eina_Bool focus = EINA_FALSE, skip = EINA_FALSE, fast = EINA_FALSE, reshadow = EINA_FALSE, no_shadow = EINA_FALSE, pass_event_flag = EINA_FALSE;
Eina_Stringshare *name, *title;
E_Comp_Config *conf = e_comp_config_get();
if (!_e_comp_object_shadow_client_match(cw->ec, m)) continue;
focus = m->focus;
- urgent = m->urgent;
no_shadow = m->no_shadow;
if (m->shadow_style)
{
e_comp_object_signal_emit(cw->smart_obj, "e,state,focused", "e");
else
e_comp_object_signal_emit(cw->smart_obj, "e,state,unfocused", "e");
- if (urgent || cw->ec->urgent)
- e_comp_object_signal_emit(cw->smart_obj, "e,state,urgent", "e");
- else
- e_comp_object_signal_emit(cw->smart_obj, "e,state,not_urgent", "e");
if (cw->ec->sticky)
e_comp_object_signal_emit(cw->smart_obj, "e,state,sticky", "e");
if (cw->ec->hung)
zone = history_policy->zone;
ec->focused = 1;
- e_client_urgent_set(ec, 0);
// TODO: This is not for focus policy, but for fullscreen(Window State) policy.
// Move this code to the better place.
zone = topmost_policy->zone;
ec->focused = 1;
- e_client_urgent_set(ec, 0);
// TODO: This is not for focus policy, but for fullscreen(Window State) policy.
// Move this code to the better place.
}
static const char*
-_set_win_prop_Urgent(Evas_Object *evas_obj, const char *prop_value)
-{
- E_Client *ec = evas_object_data_get(evas_obj, "E_Client");
-
- if(strstr(prop_value, "TRUE"))
- e_client_urgent_set(ec, EINA_TRUE);
- else if(strstr(prop_value, "FALSE"))
- e_client_urgent_set(ec, EINA_FALSE);
- else
- return strdup("invalid property value");
-
- return NULL;
-}
-
-static const char*
-_get_win_prop_Urgent(const Evas_Object *evas_obj)
-{
- const E_Client *ec = evas_object_data_get(evas_obj, "E_Client");
- EINA_SAFETY_ON_NULL_RETURN_VAL(ec, NULL);
-
- return ec->urgent ? strdup("TRUE") : strdup("FALSE");
-}
-
-static const char*
_set_win_prop_Sticky(Evas_Object *evas_obj, const char *prop_value)
{
E_Client *ec = evas_object_data_get(evas_obj, "E_Client");
_set_win_prop_Sticky
},
{
- "Urgent",
- _get_win_prop_Urgent,
- _set_win_prop_Urgent
- },
- {
"Fullscreen",
_get_win_prop_Fullscreen,
_set_win_prop_Fullscreen
desk->fullscreen_clients = eina_list_remove(desk->fullscreen_clients, ec);
e_client_comp_hidden_set(ec, 1);
evas_object_hide(ec->frame);
- e_client_urgent_set(ec, ec->icccm.urgent);
e_client_iconify_event_send(ec);