E_CLIENT_*FOREACH() macros no longer take a E_Comp param

This commit is contained in:
Mike Blumenkrantz 2015-03-13 15:45:07 -04:00
parent 091142b032
commit 91edd1ce2f
22 changed files with 48 additions and 48 deletions

View File

@ -1085,7 +1085,7 @@ ACT_FN_GO(window_push, )
desk_current = e_desk_current_get(ec->zone);
E_CLIENT_FOREACH(e_comp, cur)
E_CLIENT_FOREACH(cur)
{
if (((cur->desk == desk_current) || (cur->sticky)) && (ec != cur) && (!cur->iconic))
{

View File

@ -1108,7 +1108,7 @@ _e_client_under_pointer_helper(E_Desk *desk, E_Client *exclude, int x, int y)
{
E_Client *ec = NULL, *cec;
E_CLIENT_REVERSE_FOREACH(e_comp, cec)
E_CLIENT_REVERSE_FOREACH(cec)
{
/* If a border was specified which should be excluded from the list
* (because it will be closed shortly for example), skip */
@ -2309,7 +2309,7 @@ e_client_idler_before(void)
_e_client_hook_call(E_CLIENT_HOOK_EVAL_POST_FRAME_ASSIGN, ec);
}
E_CLIENT_FOREACH(e_comp, ec)
E_CLIENT_FOREACH(ec)
{
// pass 2 - show windows needing show
if ((ec->changes.visible) && (ec->visible) &&
@ -2334,7 +2334,7 @@ e_client_idler_before(void)
_e_client_layout_cb(e_comp);
// pass 3 - hide windows needing hide and eval (main eval)
E_CLIENT_FOREACH(e_comp, ec)
E_CLIENT_FOREACH(ec)
{
if (e_object_is_del(E_OBJECT(ec))) continue;

View File

@ -712,11 +712,11 @@ struct E_Client
# define EC_CHANGED(EC) EC->changed = 1
#endif
#define E_CLIENT_FOREACH(COMP, EC) \
for (EC = e_client_bottom_get(COMP); EC; EC = e_client_above_get(EC))
#define E_CLIENT_FOREACH(EC) \
for (EC = e_client_bottom_get(e_comp); EC; EC = e_client_above_get(EC))
#define E_CLIENT_REVERSE_FOREACH(COMP, EC) \
for (EC = e_client_top_get(COMP); EC; EC = e_client_below_get(EC))
#define E_CLIENT_REVERSE_FOREACH(EC) \
for (EC = e_client_top_get(e_comp); EC; EC = e_client_below_get(EC))
EAPI extern int E_EVENT_CLIENT_ADD;

View File

@ -171,7 +171,7 @@ _e_comp_fullscreen_check(E_Comp *c)
{
E_Client *ec;
E_CLIENT_REVERSE_FOREACH(c, ec)
E_CLIENT_REVERSE_FOREACH(ec)
{
Evas_Object *o = ec->frame;
@ -235,7 +235,7 @@ _e_comp_cb_nocomp_begin(E_Comp *c)
ecf = _e_comp_fullscreen_check(c);
if (!ecf) return;
c->nocomp_ec = ecf;
E_CLIENT_FOREACH(c, ec)
E_CLIENT_FOREACH(ec)
if (ec != ecf) e_client_redirected_set(ec, 0);
INF("NOCOMP %p: frame %p", ecf, ecf->frame);
@ -268,7 +268,7 @@ _e_comp_cb_nocomp_end(E_Comp *c)
INF("COMP RESUME!");
//ecore_evas_manual_render_set(c->ee, EINA_FALSE);
ecore_evas_show(c->ee);
E_CLIENT_FOREACH(c, ec)
E_CLIENT_FOREACH(ec)
{
e_client_redirected_set(ec, 1);
if (ec->visible && (!ec->input_only))
@ -888,7 +888,7 @@ _e_comp_screensaver_off(void *data EINA_UNUSED, int type EINA_UNUSED, void *even
edje_object_signal_emit(zone->over, "e,state,screensaver,off", "e");
e_zone_fade_handle(zone, 0, 0.5);
}
E_CLIENT_FOREACH(e_comp, ec)
E_CLIENT_FOREACH(ec)
if (e_comp_object_damage_exists(ec->frame))
e_comp_object_render_update_add(ec->frame);
@ -1365,7 +1365,7 @@ e_comp_shadows_reset(void)
_e_comp_fps_update(e_comp);
E_LIST_FOREACH(e_comp->zones, e_comp_canvas_zone_update);
E_CLIENT_FOREACH(e_comp, ec)
E_CLIENT_FOREACH(ec)
e_comp_object_frame_theme_set(ec->frame, E_COMP_OBJECT_FRAME_RESHADOW);
}

View File

@ -396,7 +396,7 @@ e_comp_canvas_update(void)
E_Client *ec;
printf("reassign all clients from deleted zone %p\n", zone);
E_CLIENT_FOREACH(e_comp, ec)
E_CLIENT_FOREACH(ec)
{
if (ec->zone == zone)
{

View File

@ -38,7 +38,7 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou
/* get compositor data */
if (!(cdata = wl_resource_get_user_data(resource))) return;
E_CLIENT_FOREACH(e_comp, ec)
E_CLIENT_FOREACH(ec)
{
if (!ec->comp_data->surface) continue;
if (client != wl_resource_get_client(ec->comp_data->surface)) continue;

View File

@ -4697,7 +4697,7 @@ _e_comp_x_randr_change(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *ev
_e_comp_x_xinerama_setup(e_comp->man->w, e_comp->man->h);
e_comp_canvas_update();
E_CLIENT_FOREACH(e_comp, ec)
E_CLIENT_FOREACH(ec)
{
if (!e_client_util_ignored_get(ec))
_e_comp_x_client_zone_geometry_set(ec);
@ -4715,7 +4715,7 @@ _e_comp_x_ee_resize(Ecore_Evas *ee EINA_UNUSED)
_e_comp_x_xinerama_setup(e_comp->man->w, e_comp->man->h);
e_comp_canvas_update();
E_CLIENT_FOREACH(e_comp, ec)
E_CLIENT_FOREACH(ec)
{
if (!e_client_util_ignored_get(ec))
_e_comp_x_client_zone_geometry_set(ec);
@ -5168,7 +5168,7 @@ _e_comp_x_setup(E_Comp *c, Ecore_X_Window root, int w, int h)
{
E_Client *ec;
E_CLIENT_REVERSE_FOREACH(c, ec)
E_CLIENT_REVERSE_FOREACH(ec)
if (!e_client_util_ignored_get(ec))
{
ec->want_focus = ec->take_focus = 1;

View File

@ -111,7 +111,7 @@ e_desk_client_top_visible_get(const E_Desk *desk)
E_OBJECT_CHECK_RETURN(desk, NULL);
E_OBJECT_TYPE_CHECK_RETURN(desk, E_DESK_TYPE, NULL);
E_CLIENT_REVERSE_FOREACH(e_comp, ec)
E_CLIENT_REVERSE_FOREACH(ec)
if (e_client_util_desk_visible(ec, desk) && evas_object_visible_get(ec->frame)) return ec;
return NULL;
}
@ -342,7 +342,7 @@ e_desk_deskshow(E_Zone *zone)
/* uniconify raises windows and changes stacking order
* go top-down to avoid skipping windows
*/
E_CLIENT_REVERSE_FOREACH(zone->comp, ec)
E_CLIENT_REVERSE_FOREACH(ec)
{
if (e_client_util_ignored_get(ec)) continue;
if (ec->desk != desk) continue;
@ -358,7 +358,7 @@ e_desk_deskshow(E_Zone *zone)
/*
* iconify raises, so we ahve to start from the bottom so we are going forward
*/
E_CLIENT_FOREACH(zone->comp, ec)
E_CLIENT_FOREACH(ec)
{
if (e_client_util_ignored_get(ec)) continue;
if (ec->desk != desk) continue;
@ -693,7 +693,7 @@ e_desk_flip_end(E_Desk *desk)
* user has flipped to this desk. let's be helpful and
* focus a random window!
*/
E_CLIENT_REVERSE_FOREACH(e_comp, ec)
E_CLIENT_REVERSE_FOREACH(ec)
{
/* start with top and go down... */
if (e_client_util_ignored_get(ec)) continue;
@ -825,7 +825,7 @@ _e_desk_show_begin(E_Desk *desk, int dx, int dy)
_e_desk_flip_cb(_e_desk_flip_data, desk, dx, dy, 1);
return;
}
E_CLIENT_FOREACH(desk->zone->comp, ec)
E_CLIENT_FOREACH(ec)
{
if (e_client_util_ignored_get(ec) || (ec->desk->zone != desk->zone) || (ec->iconic)) continue;
if (ec->moving)
@ -867,7 +867,7 @@ _e_desk_hide_begin(E_Desk *desk, int dx, int dy)
_e_desk_flip_cb(_e_desk_flip_data, desk, dx, dy, 0);
return;
}
E_CLIENT_FOREACH(desk->zone->comp, ec)
E_CLIENT_FOREACH(ec)
{
if (e_client_util_ignored_get(ec) || (ec->desk->zone != desk->zone) || (ec->iconic)) continue;
if (ec->moving) continue;

View File

@ -347,7 +347,7 @@ e_hints_client_stacking_set(void)
Eina_List *ll = NULL;
#endif
clients = calloc(c, sizeof(Ecore_X_Window));
E_CLIENT_FOREACH(e_comp, ec)
E_CLIENT_FOREACH(ec)
{
if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_X)
{

View File

@ -43,7 +43,7 @@ e_maximize_client_dock_fit(E_Client *ec, int *x1, int *yy1, int *x2, int *y2)
cy2 = ec->zone->y + ec->zone->h;
if (y2) cy2 = *y2;
E_CLIENT_FOREACH(e_comp, ec2)
E_CLIENT_FOREACH(ec2)
{
enum
{
@ -152,7 +152,7 @@ e_maximize_client_client_fill(E_Client *ec, int *x1, int *yy1, int *x2, int *y2,
E_Maximize_Rect *r;
E_Client *ec2;
E_CLIENT_FOREACH(e_comp, ec2)
E_CLIENT_FOREACH(ec2)
{
if ((ec2->zone != ec->zone) || (ec == ec2) || (ec2->desk != ec->desk && !ec2->sticky) || (ec2->iconic))
continue;

View File

@ -9,7 +9,7 @@ e_place_zone_region_smart_cleanup(E_Zone *zone)
E_OBJECT_CHECK(zone);
desk = e_desk_current_get(zone);
E_CLIENT_FOREACH(zone->comp, ec)
E_CLIENT_FOREACH(ec)
{
/* Build a list of windows on this desktop and not iconified. */
if ((ec->desk == desk) && (!ec->iconic) &&
@ -63,7 +63,7 @@ _e_place_coverage_client_add(E_Desk *desk, Eina_List *skiplist, int ar, int x, i
int iw, ih;
int x0, x00, yy0, y00;
E_CLIENT_FOREACH(desk->zone->comp, ec)
E_CLIENT_FOREACH(ec)
{
if (eina_list_data_find(skiplist, ec)) continue;
if (e_client_util_ignored_get(ec)) continue;
@ -247,7 +247,7 @@ e_place_desk_region_smart(E_Desk *desk, Eina_List *skiplist, int x, int y, int w
}
}
E_CLIENT_FOREACH(desk->zone->comp, ec)
E_CLIENT_FOREACH(ec)
{
int bx, by, bw, bh;

View File

@ -56,7 +56,7 @@ e_resist_client_position(E_Comp *c, Eina_List *skiplist,
/* FIXME: need to add resist or complete BLOCKS for things like ibar */
/* can add code here to add more fake obstacles with custom resist values */
/* here if need be - ie xinerama middle between screens and panels etc. */
E_CLIENT_FOREACH(c, ec)
E_CLIENT_FOREACH(ec)
{
if (e_client_util_ignored_get(ec) || (!evas_object_visible_get(ec->frame))) continue;
if (ec->offer_resistance && (!eina_list_data_find(skiplist, ec)))

View File

@ -660,7 +660,7 @@ _e_sys_cb_logout_timer(void *data __UNUSED__)
E_Client *ec;
int pending = 0;
E_CLIENT_FOREACH(e_comp, ec)
E_CLIENT_FOREACH(ec)
{
if (e_client_util_ignored_get(ec)) continue;
if (!ec->internal) pending++;

View File

@ -275,7 +275,7 @@ e_zone_reconfigure_clients(E_Zone *zone, int dx, int dy, int dw, int dh)
{
E_Client *ec;
E_CLIENT_FOREACH(zone->comp, ec)
E_CLIENT_FOREACH(ec)
{
if (ec->zone != zone) continue;
@ -688,7 +688,7 @@ e_zone_desk_count_set(E_Zone *zone,
{
desk = zone->desks[x + (y * zone->desk_x_count)];
E_CLIENT_FOREACH(zone->comp, ec)
E_CLIENT_FOREACH(ec)
{
if (ec->desk == desk)
e_client_desk_set(ec, new_desk);
@ -706,7 +706,7 @@ e_zone_desk_count_set(E_Zone *zone,
{
desk = zone->desks[x + (y * zone->desk_x_count)];
E_CLIENT_FOREACH(zone->comp, ec)
E_CLIENT_FOREACH(ec)
{
if (ec->desk == desk)
e_client_desk_set(ec, new_desk);

View File

@ -408,7 +408,7 @@ _ibox_fill(IBox *b)
int ok;
int mw, mh, h;
E_CLIENT_FOREACH(b->zone->comp, ec)
E_CLIENT_FOREACH(ec)
{
if (e_client_util_ignored_get(ec)) continue;
ok = 0;

View File

@ -129,7 +129,7 @@ _policy_border_hide_above(E_Client *ec)
if (!ec) return;
E_CLIENT_REVERSE_FOREACH(e_comp, b)
E_CLIENT_REVERSE_FOREACH(b)
{
if (e_client_util_ignored_get(b)) continue;
if (b->layer <= ec->layer) break;
@ -157,7 +157,7 @@ _policy_border_hide_below(E_Client *ec)
if (!ec) return;
E_CLIENT_FOREACH(e_comp, b)
E_CLIENT_FOREACH(b)
{
if (e_client_util_ignored_get(b)) continue;
/* break if it's the same client */
@ -209,7 +209,7 @@ _policy_border_show_below(E_Client *ec)
}
}
E_CLIENT_FOREACH(e_comp, b)
E_CLIENT_FOREACH(b)
{
if (e_client_util_ignored_get(b)) continue;
/* break if it's the same border */

View File

@ -117,7 +117,7 @@ _policy_border_hide_below(E_Client *ec)
if (!ec) return;
/* Find the windows below this one */
E_CLIENT_FOREACH(e_comp, b)
E_CLIENT_FOREACH(b)
{
if (e_client_util_ignored_get(b)) continue;
if (b->layer < E_LAYER_CLIENT_BELOW) continue;
@ -172,7 +172,7 @@ _policy_border_show_below(E_Client *ec)
}
/* Find the windows below this one */
E_CLIENT_FOREACH(e_comp, b)
E_CLIENT_FOREACH(b)
{
if (e_client_util_ignored_get(b)) continue;
if (b->layer < E_LAYER_CLIENT_BELOW) continue;

View File

@ -481,7 +481,7 @@ _pager_desk_new(Pager *p, E_Desk *desk, int xpos, int ypos, Eina_Bool invert)
edje_object_part_swallow(pd->o_desk, "e.swallow.content", pd->o_layout);
evas_object_show(o);
E_CLIENT_FOREACH(desk->zone->comp, ec)
E_CLIENT_FOREACH(ec)
{
Pager_Win *pw;

View File

@ -435,7 +435,7 @@ e_mod_pol_desk_add(E_Desk *desk)
eina_hash_add(hash_pol_desks, &desk, pd);
/* add clients */
E_CLIENT_FOREACH(e_comp, ec)
E_CLIENT_FOREACH(ec)
{
if (pd->desk == ec->desk)
_pol_client_add(ec);

View File

@ -33,7 +33,7 @@ _pol_softkey_iconify(E_Zone *zone, Eina_Bool all)
desk = e_desk_current_get(zone);
launcher = e_mod_pol_client_launcher_get(zone);
E_CLIENT_REVERSE_FOREACH(e_comp, ec)
E_CLIENT_REVERSE_FOREACH(ec)
{
if (e_client_util_ignored_get(ec)) continue;
if (!e_client_util_desk_visible(ec, desk)) continue;

View File

@ -507,7 +507,7 @@ _desk_config_apply(E_Desk *d, int old_nb_stacks, int new_nb_stacks)
{
E_Client *ec;
E_CLIENT_FOREACH(e_comp, ec)
E_CLIENT_FOREACH(ec)
{
_client_apply_settings(ec, NULL);
}
@ -519,7 +519,7 @@ _desk_config_apply(E_Desk *d, int old_nb_stacks, int new_nb_stacks)
/* Add all the existing windows. */
E_Client *ec;
E_CLIENT_FOREACH(e_comp, ec)
E_CLIENT_FOREACH(ec)
{
_add_client(ec);
}
@ -1503,7 +1503,7 @@ e_modapi_init(E_Module *m)
{
E_Client *ec;
E_CLIENT_FOREACH(e_comp, ec)
E_CLIENT_FOREACH(ec)
{
_add_client(ec);
}

View File

@ -26,7 +26,7 @@ _e_mod_drm_cb_activate(void *data, int type EINA_UNUSED, void *event)
session_state = EINA_TRUE;
ecore_evas_show(c->ee);
E_CLIENT_FOREACH(c, ec)
E_CLIENT_FOREACH(ec)
{
if (ec->visible && (!ec->input_only))
e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);