unify client borderless checks to use util function

This commit is contained in:
Mike Blumenkrantz 2014-01-20 15:12:40 -05:00
parent 8fe70c3d2a
commit aefaaea57b
4 changed files with 5 additions and 5 deletions

View File

@ -1989,7 +1989,7 @@ _e_client_frame_update(E_Client *ec)
bordername = "borderless";
else if (ec->bordername)
bordername = ec->bordername;
else if ((ec->mwm.borderless) || (ec->borderless))
else if (ec->mwm.borderless)
bordername = "borderless";
else if (((ec->icccm.transient_for != 0) ||
(ec->dialog)) &&

View File

@ -621,7 +621,7 @@ _e_comp_shapes_update_comp_client_shape_comp_helper(E_Client *ec, Eina_Tiler *tb
}
#endif
if ((!ec->borderless) && (e_util_strcmp(ec->border.name, "borderless")))
if (!e_client_util_borderless(ec))
{
/* add the frame */
eina_tiler_rect_add(tb, &(Eina_Rectangle){ec->x, ec->y, ec->w, ec->h});

View File

@ -139,7 +139,7 @@ _e_comp_object_do_shadow(E_Comp_Object *cw)
{
if (cw->ec->shaped) return 0;
if (cw->frame_object) return 0;
if (cw->ec->borderless || (!e_util_strcmp(cw->ec->border.name, "borderless")))
if (e_client_util_borderless(cw->ec))
return 0;
}
return 1;
@ -313,7 +313,7 @@ _e_comp_object_shadow_client_match(const E_Client *ec, E_Comp_Match *m)
{
int borderless = 0;
if ((ec->mwm.borderless) || (ec->borderless))
if (e_client_util_borderless(ec))
borderless = 1;
if (!(((m->borderless == -1) && (!borderless)) ||
((m->borderless == 1) && (borderless))))

View File

@ -124,7 +124,7 @@ e_int_client_menu_create(E_Client *ec)
if (ec->desktop)
e_util_desktop_menu_item_icon_add(ec->desktop, 16, mi);
}
borderless = ec->borderless || (!ec->border.name) || (!e_util_strcmp("borderless", ec->border.name));
borderless = e_client_util_borderless(ec);
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Window"));