remove e_comp_list(), deprecate all related functions for pending removal

there is only one E_Comp which can now be accessed by the e_comp global.

if you're editing a file with some uses of these deprecated functions, replace their usages with appropriate references to this variable

pass -Wno-deprecated-declarations to ignore these warnings during build
This commit is contained in:
Mike Blumenkrantz 2015-01-05 15:27:41 -05:00
parent 2d580a2f87
commit 922af2c52f
48 changed files with 865 additions and 1297 deletions

View File

@ -1573,14 +1573,11 @@ ACT_FN_GO(desk_linear_flip_to, )
#define DESK_ACTION_ALL(zone, act) \
E_Zone * zone; \
const Eina_List *lc, *lz; \
E_Comp *c; \
const Eina_List *lz; \
\
EINA_LIST_FOREACH(e_comp_list(), lc, c) { \
EINA_LIST_FOREACH(c->zones, lz, zone) { \
EINA_LIST_FOREACH(e_comp->zones, lz, zone) { \
act; \
} \
}
/***************************************************************************/
ACT_FN_GO(desk_flip_by_all, )
@ -1717,24 +1714,20 @@ ACT_FN_GO(screen_send_by, )
#define ZONE_DESK_ACTION(con_num, zone_num, zone, act) \
E_Zone * zone; \
if ((con_num < 0) || (zone_num < 0)) { \
Eina_List *l, *ll; \
E_Comp *c; \
Eina_List *l; \
if ((con_num >= 0) && (zone_num < 0)) /* con=1 zone=all */ { \
c = e_util_comp_number_get(con_num); \
EINA_LIST_FOREACH(c->zones, l, zone) { \
EINA_LIST_FOREACH(e_comp->zones, l, zone) { \
act; \
} } \
else if ((con_num < 0) && (zone_num >= 0)) /* c=all zone=1 */ { \
EINA_LIST_FOREACH(e_comp_list(), l, c) { \
zone = e_comp_zone_number_get(c, zone_num); \
if (zone) \
act; \
} } \
} \
else if ((con_num < 0) && (zone_num < 0)) /* c=all zone=all */ { \
EINA_LIST_FOREACH(e_comp_list(), l, c) { \
EINA_LIST_FOREACH(c->zones, lll, zone) { \
EINA_LIST_FOREACH(e_comp->zones, lll, zone) { \
act; \
} } } } } \
} } } \
else { \
zone = e_util_comp_zone_number_get(con_num, zone_num); \
if (zone) act; \

View File

@ -100,14 +100,12 @@ e_backlight_exists(void)
EAPI void
e_backlight_update(void)
{
const Eina_List *l, *ll;
E_Comp *c;
const Eina_List *l;
E_Zone *zone;
if (bl_avail == EINA_FALSE) return;
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
_e_backlight_update(zone);
}

View File

@ -403,12 +403,10 @@ e_bg_del(int manager, int zone, int desk_x, int desk_y)
EAPI void
e_bg_update(void)
{
const Eina_List *l, *ll;
E_Comp *c;
const Eina_List *l;
E_Zone *zone;
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
e_zone_bg_reconfigure(zone);
}

View File

@ -86,13 +86,11 @@ static Eina_Inlist *_e_client_hooks[] =
static Eina_Bool
_e_client_cb_efreet_cache_update(void *data EINA_UNUSED, int type EINA_UNUSED, void *ev EINA_UNUSED)
{
E_Comp *c;
const Eina_List *l, *ll;
const Eina_List *l;
E_Client *ec;
/* mark all clients for desktop/icon updates */
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->clients, ll, ec)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
E_FREE_FUNC(ec->desktop, efreet_desktop_free);
if (e_object_is_del(E_OBJECT(ec))) continue;
@ -105,13 +103,11 @@ _e_client_cb_efreet_cache_update(void *data EINA_UNUSED, int type EINA_UNUSED, v
static Eina_Bool
_e_client_cb_config_icon_theme(void *data EINA_UNUSED, int type EINA_UNUSED, void *ev EINA_UNUSED)
{
E_Comp *c;
const Eina_List *l, *ll;
const Eina_List *l;
E_Client *ec;
/* mark all clients for desktop/icon updates */
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->clients, ll, ec)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
if (e_object_is_del(E_OBJECT(ec))) continue;
ec->changes.icon = 1;
@ -123,8 +119,7 @@ _e_client_cb_config_icon_theme(void *data EINA_UNUSED, int type EINA_UNUSED, voi
static Eina_Bool
_e_client_cb_config_mode(void *data EINA_UNUSED, int type EINA_UNUSED, void *ev EINA_UNUSED)
{
E_Comp *c;
const Eina_List *l, *ll;
const Eina_List *l;
E_Client *ec;
E_Layer layer;
@ -137,8 +132,7 @@ _e_client_cb_config_mode(void *data EINA_UNUSED, int type EINA_UNUSED, void *ev
else
return ECORE_CALLBACK_RENEW;
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->clients, ll, ec)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
if (e_object_is_del(E_OBJECT(ec))) continue;
if ((ec->fullscreen) || (ec->need_fullscreen))
@ -163,12 +157,10 @@ _e_client_cb_pointer_warp(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_
static Eina_Bool
_e_client_cb_desk_window_profile_change(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_Desk_Window_Profile_Change *ev EINA_UNUSED)
{
E_Comp *c;
const Eina_List *l, *ll;
const Eina_List *l;
E_Client *ec;
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->clients, ll, ec)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
if (e_object_is_del(E_OBJECT(ec))) continue;
ec->e.fetch.profile = 1;
@ -2268,16 +2260,13 @@ EINTERN void
e_client_idler_before(void)
{
const Eina_List *l;
E_Comp *c;
E_Client *ec;
if (!eina_hash_population(clients_hash)) return;
EINA_LIST_FOREACH(e_comp_list(), l, c)
{
Eina_List *ll;
E_Client *ec;
EINA_LIST_FOREACH(c->clients, ll, ec)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
Eina_Stringshare *title;
// pass 1 - eval0. fetch properties on new or on change and
@ -2302,7 +2291,7 @@ e_client_idler_before(void)
_e_client_hook_call(E_CLIENT_HOOK_EVAL_POST_FRAME_ASSIGN, ec);
}
E_CLIENT_FOREACH(c, ec)
E_CLIENT_FOREACH(e_comp, ec)
{
// pass 2 - show windows needing show
if ((ec->changes.visible) && (ec->visible) &&
@ -2324,10 +2313,10 @@ e_client_idler_before(void)
}
if (_e_client_layout_cb)
_e_client_layout_cb(c);
_e_client_layout_cb(e_comp);
// pass 3 - hide windows needing hide and eval (main eval)
E_CLIENT_FOREACH(c, ec)
E_CLIENT_FOREACH(e_comp, ec)
{
if (e_object_is_del(E_OBJECT(ec))) continue;
@ -2347,7 +2336,6 @@ e_client_idler_before(void)
ec->changed = ec->changes.visible;
}
}
}
}
@ -2682,29 +2670,17 @@ e_client_warping_get(void)
EAPI Eina_List *
e_clients_immortal_list(const E_Comp *c)
e_clients_immortal_list(void)
{
const Eina_List *l, *ll;
const Eina_List *l;
Eina_List *list = NULL;
E_Client *ec;
if (c)
{
EINA_LIST_FOREACH(c->clients, ll, ec)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
if (ec->lock_life)
list = eina_list_append(list, ec);
}
}
else
{
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->clients, ll, ec)
{
if (ec->lock_life)
list = eina_list_append(list, ec);
}
}
return list;
}
@ -3530,17 +3506,13 @@ EAPI Eina_List *
e_client_lost_windows_get(E_Zone *zone)
{
Eina_List *list = NULL;
const Eina_List *l, *ll;
const Eina_List *l;
E_Client *ec;
E_Comp *c;
int loss_overlap = 5;
E_OBJECT_CHECK_RETURN(zone, NULL);
E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, NULL);
EINA_LIST_FOREACH(e_comp_list(), l, c)
{
if (zone->comp != c) continue;
EINA_LIST_FOREACH(c->clients, ll, ec)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
if (ec->zone != zone) continue;
@ -3553,7 +3525,6 @@ e_client_lost_windows_get(E_Zone *zone)
list = eina_list_append(list, ec);
}
}
}
return list;
}

View File

@ -748,7 +748,7 @@ EAPI void e_client_desk_set(E_Client *ec, E_Desk *desk);
EAPI Eina_Bool e_client_comp_grabbed_get(void);
EAPI E_Client *e_client_action_get(void);
EAPI E_Client *e_client_warping_get(void);
EAPI Eina_List *e_clients_immortal_list(const E_Comp *c);
EAPI Eina_List *e_clients_immortal_list(void);
EAPI void e_client_mouse_in(E_Client *ec, int x, int y);
EAPI void e_client_mouse_out(E_Client *ec, int x, int y);
EAPI void e_client_mouse_wheel(E_Client *ec, Evas_Point *output, E_Binding_Event_Wheel *ev);

View File

@ -21,7 +21,7 @@
static Eina_List *handlers = NULL;
static Eina_List *hooks = NULL;
static Eina_List *compositors = NULL;
EAPI E_Comp *e_comp = NULL;
static Eina_Hash *ignores = NULL;
static Eina_List *actions = NULL;
@ -532,13 +532,6 @@ _e_comp_cb_animator(void *data)
//////////////////////////////////////////////////////////////////////////
static Eina_Bool
_e_comp_cb_zone_change(void *data EINA_UNUSED, int type EINA_UNUSED, EINA_UNUSED void *event)
{
E_LIST_FOREACH(compositors, e_comp_canvas_update);
return ECORE_CALLBACK_PASS_ON;
}
#ifdef SHAPE_DEBUG
static void
_e_comp_shape_debug_rect(E_Comp *c, Eina_Rectangle *rect, E_Color *color)
@ -855,26 +848,21 @@ _e_comp_override_expire(void *data)
static Eina_Bool
_e_comp_screensaver_on(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
{
Eina_List *l, *ll;
Eina_List *l;
E_Zone *zone;
E_Comp *c;
ecore_frametime = ecore_animator_frametime_get();
// fixme: use hash if compositors list > 4
EINA_LIST_FOREACH(compositors, l, c)
{
if (c->saver) continue;
e_comp_override_add(c);
c->saver = EINA_TRUE;
if (c->render_animator)
ecore_animator_freeze(c->render_animator);
EINA_LIST_FOREACH(c->zones, ll, zone)
if (e_comp->saver) return ECORE_CALLBACK_RENEW;
e_comp_override_add(e_comp);
e_comp->saver = EINA_TRUE;
if (e_comp->render_animator)
ecore_animator_freeze(e_comp->render_animator);
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
e_zone_fade_handle(zone, 1, 3.0);
edje_object_signal_emit(zone->base, "e,state,screensaver,on", "e");
edje_object_signal_emit(zone->over, "e,state,screensaver,on", "e");
}
}
return ECORE_CALLBACK_PASS_ON;
}
@ -882,30 +870,25 @@ _e_comp_screensaver_on(void *data EINA_UNUSED, int type EINA_UNUSED, void *event
static Eina_Bool
_e_comp_screensaver_off(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
{
Eina_List *l, *ll;
Eina_List *l;
E_Zone *zone;
E_Comp *c;
E_Client *ec;
ecore_animator_frametime_set(ecore_frametime);
// fixme: use hash if compositors list > 4
EINA_LIST_FOREACH(compositors, l, c)
{
E_Client *ec;
if (!c->saver) continue;
e_comp_override_del(c);
c->saver = EINA_FALSE;
if (!c->nocomp)
ecore_evas_manual_render_set(c->ee, EINA_FALSE);
EINA_LIST_FOREACH(c->zones, ll, zone)
if (!e_comp->saver) return ECORE_CALLBACK_RENEW;
e_comp_override_del(e_comp);
e_comp->saver = EINA_FALSE;
if (!e_comp->nocomp)
ecore_evas_manual_render_set(e_comp->ee, EINA_FALSE);
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
edje_object_signal_emit(zone->base, "e,state,screensaver,off", "e");
edje_object_signal_emit(zone->over, "e,state,screensaver,off", "e");
e_zone_fade_handle(zone, 0, 0.5);
}
E_CLIENT_FOREACH(c, ec)
E_CLIENT_FOREACH(e_comp, ec)
if (e_comp_object_damage_exists(ec->frame))
e_comp_object_render_update_add(ec->frame);
}
return ECORE_CALLBACK_PASS_ON;
}
@ -1076,7 +1059,7 @@ e_comp_init(void)
#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
e_comp_wl_init();
#endif
if (!compositors) return EINA_FALSE;
if (!e_comp) return EINA_FALSE;
out:
e_util_env_set("HYBRIS_EGLPLATFORM", NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_SCREENSAVER_ON, _e_comp_screensaver_on, NULL);
@ -1085,10 +1068,6 @@ out:
E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_KEY_DOWN, _e_comp_key_down, NULL);
E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_SIGNAL_USER, _e_comp_signal_user, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_MOVE_RESIZE, _e_comp_cb_zone_change, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_ADD, _e_comp_cb_zone_change, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_DEL, _e_comp_cb_zone_change, NULL);
return EINA_TRUE;
}
@ -1278,17 +1257,16 @@ EAPI E_Comp *
e_comp_new(void)
{
E_Comp *c;
char name[40];
if (e_comp)
CRI("CANNOT REPLACE EXISTING COMPOSITOR");
c = E_OBJECT_ALLOC(E_Comp, E_COMP_TYPE, _e_comp_free);
if (!c) return NULL;
c->num = eina_list_count(compositors);
snprintf(name, sizeof(name), _("Compositor %u"), c->num);
c->name = eina_stringshare_add(name);
c->name = eina_stringshare_add(_("Compositor"));
c->render_animator = ecore_animator_add(_e_comp_cb_animator, c);
ecore_animator_freeze(c->render_animator);
compositors = eina_list_append(compositors, c);
e_comp = c;
return c;
}
@ -1301,15 +1279,10 @@ e_comp_internal_save(void)
EINTERN int
e_comp_shutdown(void)
{
E_Comp *c;
E_FREE_FUNC(action_timeout, ecore_timer_del);
EINA_LIST_FREE(compositors, c)
{
while (c->clients)
e_object_del(eina_list_data_get(c->clients));
e_object_del(E_OBJECT(c));
}
while (e_comp->clients)
e_object_del(eina_list_data_get(e_comp->clients));
e_object_del(E_OBJECT(e_comp));
E_FREE_LIST(handlers, ecore_event_handler_del);
E_FREE_LIST(actions, e_object_del);
E_FREE_LIST(hooks, e_client_hook_del);
@ -1381,114 +1354,21 @@ e_comp_config_get(void)
return conf;
}
EAPI const Eina_List *
e_comp_list(void)
{
return compositors;
}
EAPI void
e_comp_shadows_reset(void)
{
Eina_List *l;
E_Comp *c;
EINA_LIST_FOREACH(compositors, l, c)
{
E_Client *ec;
_e_comp_fps_update(c);
E_LIST_FOREACH(c->zones, e_comp_canvas_zone_update);
E_CLIENT_FOREACH(c, ec)
_e_comp_fps_update(e_comp);
E_LIST_FOREACH(e_comp->zones, e_comp_canvas_zone_update);
E_CLIENT_FOREACH(e_comp, ec)
e_comp_object_frame_theme_set(ec->frame, E_COMP_OBJECT_FRAME_RESHADOW);
}
}
EAPI E_Comp *
e_comp_get(const void *o)
e_comp_get(const void *o EINA_UNUSED)
{
E_Client *ec;
E_Shelf *es;
E_Menu *m;
E_Desk *desk;
E_Menu_Item *mi;
const E_Object *obj = o;
E_Zone *zone = NULL;
E_Manager *man = NULL;
E_Gadcon_Popup *gp;
E_Gadcon *gc;
E_Gadcon_Client *gcc;
E_Drag *drag;
if (!o)
{
if (!(obj = (E_Object*)e_manager_current_get()))
return NULL;
}
/* try to get to zone type first */
switch (obj->type)
{
case E_DESK_TYPE:
desk = (E_Desk*)obj;
obj = (void*)desk->zone;
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
break;
case E_CLIENT_TYPE:
ec = (E_Client*)obj;
return ec->comp;
case E_MENU_TYPE:
m = (E_Menu*)obj;
obj = (void*)m->zone;
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
break;
case E_MENU_ITEM_TYPE:
mi = (E_Menu_Item*)obj;
obj = (void*)mi->menu->zone;
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
break;
case E_SHELF_TYPE:
es = (E_Shelf*)obj;
obj = (void*)es->zone;
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
break;
case E_DRAG_TYPE:
drag = (E_Drag*)obj;
return drag->comp;
case E_GADCON_POPUP_TYPE:
gp = (E_Gadcon_Popup*)obj;
obj = (void*)gp->gcc;
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
/* no break */
case E_GADCON_CLIENT_TYPE:
gcc = (E_Gadcon_Client*)obj;
obj = (void*)gcc->gadcon;
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
/* no break */
case E_GADCON_TYPE:
gc = (E_Gadcon*)obj;
obj = (void*)e_gadcon_zone_get(gc);
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
break;
default:
break;
}
switch (obj->type)
{
case E_ZONE_TYPE:
if (!zone) zone = (E_Zone*)obj;
return zone->comp;
case E_MANAGER_TYPE:
if (!man) man = (E_Manager*)obj;
return man->comp;
}
if (e_obj_is_win(obj))
{
ec = e_win_client_get((void*)obj);
return e_comp_get(ec);
}
CRI("UNIMPLEMENTED TYPE PASSED! FIXME!");
return NULL;
return e_comp;
}
@ -1585,51 +1465,33 @@ FIXME
EAPI void
e_comp_block_window_add(void)
{
E_Comp *c;
Eina_List *l;
EINA_LIST_FOREACH(compositors, l, c)
{
c->block_count++;
if (c->block_win) continue;
c->block_win = ecore_x_window_new(c->man->root, c->man->x, c->man->y, c->man->w, c->man->h);
INF("BLOCK WIN: %x", c->block_win);
ecore_x_window_background_color_set(c->block_win, 0, 0, 0);
e_comp_ignore_win_add(c->block_win);
ecore_x_window_configure(c->block_win,
e_comp->block_count++;
if (e_comp->block_win) return;
e_comp->block_win = ecore_x_window_new(e_comp->man->root, e_comp->man->x, e_comp->man->y, e_comp->man->w, e_comp->man->h);
INF("BLOCK WIN: %x", e_comp->block_win);
ecore_x_window_background_color_set(e_comp->block_win, 0, 0, 0);
e_comp_ignore_win_add(e_comp->block_win);
ecore_x_window_configure(e_comp->block_win,
ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING | ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
0, 0, 0, 0, 0, ((E_Comp_Win*)c->wins)->win, ECORE_X_WINDOW_STACK_ABOVE);
ecore_x_window_show(c->block_win);
}
0, 0, 0, 0, 0, ((E_Comp_Win*)e_comp->wins)->win, ECORE_X_WINDOW_STACK_ABOVE);
ecore_x_window_show(e_comp->block_win);
}
EAPI void
e_comp_block_window_del(void)
{
E_Comp *c;
Eina_List *l;
EINA_LIST_FOREACH(compositors, l, c)
{
if (!c->block_count) continue;
c->block_count--;
if (c->block_count) continue;
if (c->block_win) ecore_x_window_free(c->block_win);
c->block_win = 0;
}
if (!e_comp->block_count) return;
e_comp->block_count--;
if (e_comp->block_count) return;
if (e_comp->block_win) ecore_x_window_free(e_comp->block_win);
e_comp->block_win = 0;
}
#endif
EAPI E_Comp *
e_comp_find_by_window(Ecore_Window win)
{
Eina_List *l;
E_Comp *c;
EINA_LIST_FOREACH(compositors, l, c)
{
if ((c->win == win) || (c->ee_win == win) || (c->man->root == win)) return c;
}
if ((e_comp->win == win) || (e_comp->ee_win == win) || (e_comp->man->root == win)) return e_comp;
return NULL;
}
@ -1740,34 +1602,22 @@ e_comp_gl_get(void)
EAPI E_Comp *
e_comp_evas_find(const Evas *e)
{
Eina_List *l;
E_Comp *c;
EINA_LIST_FOREACH(compositors, l, c)
if (c->evas == e) return c;
if (e_comp->evas == e) return e_comp;
return NULL;
}
EAPI void
e_comp_button_bindings_ungrab_all(void)
{
Eina_List *l;
E_Comp *c;
EINA_LIST_FOREACH(compositors, l, c)
if (c->bindings_ungrab_cb)
c->bindings_ungrab_cb(c);
if (e_comp->bindings_ungrab_cb)
e_comp->bindings_ungrab_cb(e_comp);
}
EAPI void
e_comp_button_bindings_grab_all(void)
{
Eina_List *l;
E_Comp *c;
EINA_LIST_FOREACH(compositors, l, c)
if (c->bindings_grab_cb)
c->bindings_grab_cb(c);
if (e_comp->bindings_grab_cb)
e_comp->bindings_grab_cb(e_comp);
}
EAPI void

View File

@ -163,7 +163,7 @@ EAPI void e_comp_shape_queue_block(E_Comp *c, Eina_Bool block);
EAPI E_Comp_Config *e_comp_config_get(void);
EAPI const Eina_List *e_comp_list(void);
EAPI void e_comp_shadows_reset(void);
EAPI E_Comp *e_comp_get(const void *o);
EINA_DEPRECATED EAPI E_Comp *e_comp_get(const void *o);
EAPI Ecore_Window e_comp_top_window_at_xy_get(E_Comp *c, Evas_Coord x, Evas_Coord y);
EAPI void e_comp_util_wins_print(const E_Comp *c);
EAPI void e_comp_ignore_win_add(E_Pixmap_Type type, Ecore_Window win);
@ -191,7 +191,7 @@ EINTERN Evas_Object *e_comp_style_selector_create(Evas *evas, const char **sourc
EAPI E_Config_Dialog *e_int_config_comp(Evas_Object *parent, const char *params);
EAPI E_Config_Dialog *e_int_config_comp_match(Evas_Object *parent, const char *params);
static inline E_Comp *
EINA_DEPRECATED static inline E_Comp *
e_comp_util_evas_object_comp_get(Evas_Object *obj)
{
return ecore_evas_data_get(ecore_evas_ecore_evas_get(evas_object_evas_get(obj)), "comp");
@ -209,5 +209,7 @@ e_comp_util_client_is_fullscreen(const E_Client *ec)
);
}
extern EAPI E_Comp *e_comp;
#endif
#endif

View File

@ -1,5 +1,13 @@
#include "e.h"
static Eina_List *handlers;
static void
_e_comp_canvas_cb_del()
{
E_FREE_LIST(handlers, ecore_event_handler_del);
}
static void
_e_comp_canvas_event_compositor_resize_free(void *data EINA_UNUSED, void *event)
{
@ -87,6 +95,15 @@ _e_comp_canvas_cb_mouse_wheel(E_Comp *c, Evas *e EINA_UNUSED, Evas_Object *obj E
////////////////////////////////////
static Eina_Bool
_e_comp_cb_zone_change()
{
e_comp_canvas_update();
return ECORE_CALLBACK_PASS_ON;
}
////////////////////////////////////
static void
_e_comp_canvas_screensaver_active(void *d EINA_UNUSED, Evas_Object *obj, const char *sig EINA_UNUSED, const char *src EINA_UNUSED)
{
@ -132,6 +149,7 @@ e_comp_canvas_init(E_Comp *c)
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_UP, (Evas_Object_Event_Cb)_e_comp_canvas_cb_mouse_up, c);
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_IN, (Evas_Object_Event_Cb)_e_comp_canvas_cb_mouse_in, c);
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_WHEEL, (Evas_Object_Event_Cb)_e_comp_canvas_cb_mouse_wheel, c);
evas_object_event_callback_add(o, EVAS_CALLBACK_DEL, _e_comp_canvas_cb_del, NULL);
evas_object_show(o);
ecore_evas_name_class_set(c->ee, "E", "Comp_EE");
@ -155,6 +173,9 @@ e_comp_canvas_init(E_Comp *c)
}
else
e_zone_new(c, 0, 0, 0, 0, c->man->w, c->man->h);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_MOVE_RESIZE, _e_comp_cb_zone_change, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_ADD, _e_comp_cb_zone_change, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_DEL, _e_comp_cb_zone_change, NULL);
return EINA_TRUE;
}
@ -236,17 +257,6 @@ e_comp_zone_id_get(E_Comp *c, int id)
return NULL;
}
EAPI E_Comp *
e_comp_number_get(unsigned int num)
{
const Eina_List *l;
E_Comp *c;
EINA_LIST_FOREACH(e_comp_list(), l, c)
if (c->num == num) return c;
return NULL;
}
EAPI E_Desk *
e_comp_desk_window_profile_get(E_Comp *c, const char *profile)
{
@ -330,7 +340,7 @@ e_comp_canvas_zone_update(E_Zone *zone)
}
EAPI void
e_comp_canvas_update(E_Comp *c)
e_comp_canvas_update(void)
{
E_Event_Compositor_Resize *ev;
Eina_List *l, *screens, *zones = NULL, *ll;
@ -343,8 +353,8 @@ e_comp_canvas_update(E_Comp *c)
if (screens)
{
zones = c->zones;
c->zones = NULL;
zones = e_comp->zones;
e_comp->zones = NULL;
EINA_LIST_FOREACH(screens, l, scr)
{
zone = NULL;
@ -360,12 +370,12 @@ e_comp_canvas_update(E_Comp *c)
if (changed)
printf("@@@ FOUND ZONE %i %i [%p]\n", zone->num, zone->id, zone);
zones = eina_list_remove(zones, zone);
c->zones = eina_list_append(c->zones, zone);
e_comp->zones = eina_list_append(e_comp->zones, zone);
zone->num = scr->screen;
}
else
{
zone = e_zone_new(c, scr->screen, scr->escreen,
zone = e_zone_new(e_comp, scr->screen, scr->escreen,
scr->x, scr->y, scr->w, scr->h);
printf("@@@ NEW ZONE = %p\n", zone);
changed = EINA_TRUE;
@ -374,19 +384,19 @@ e_comp_canvas_update(E_Comp *c)
printf("@@@ SCREENS: %i %i | %i %i %ix%i\n",
scr->screen, scr->escreen, scr->x, scr->y, scr->w, scr->h);
}
c->zones = eina_list_sort(c->zones, 0, _e_comp_canvas_cb_zone_sort);
e_comp->zones = eina_list_sort(e_comp->zones, 0, _e_comp_canvas_cb_zone_sort);
if (zones)
{
E_Zone *spare_zone;
changed = EINA_TRUE;
spare_zone = eina_list_data_get(c->zones);
spare_zone = eina_list_data_get(e_comp->zones);
EINA_LIST_FREE(zones, zone)
{
E_Client *ec;
E_CLIENT_FOREACH(c, ec)
E_CLIENT_FOREACH(e_comp, ec)
{
if (ec->zone == zone)
{
@ -407,10 +417,10 @@ e_comp_canvas_update(E_Comp *c)
{
E_Zone *z;
z = e_comp_zone_number_get(c, 0);
z = e_comp_zone_number_get(e_comp, 0);
if (z)
{
changed |= e_zone_move_resize(z, 0, 0, c->man->w, c->man->h);
changed |= e_zone_move_resize(z, 0, 0, e_comp->man->w, e_comp->man->h);
if (changed) e_shelf_zone_move_resize_handle(z);
}
}
@ -419,12 +429,12 @@ e_comp_canvas_update(E_Comp *c)
if (!starting)
{
ev = calloc(1, sizeof(E_Event_Compositor_Resize));
ev->comp = c;
e_object_ref(E_OBJECT(c));
ev->comp = e_comp;
e_object_ref(E_OBJECT(e_comp));
ecore_event_add(E_EVENT_COMPOSITOR_RESIZE, ev, _e_comp_canvas_event_compositor_resize_free, NULL);
}
EINA_LIST_FOREACH(c->zones, l, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
E_FREE_FUNC(zone->base, evas_object_del);
E_FREE_FUNC(zone->over, evas_object_del);
@ -445,10 +455,10 @@ e_comp_canvas_update(E_Comp *c)
Eina_List *tmp = NULL;
E_Client *ec;
if (!c->layers[i].clients) continue;
if (!e_comp->layers[i].clients) continue;
/* Make temporary list as e_client_res_change_geometry_restore
* rearranges the order. */
EINA_INLIST_FOREACH(c->layers[i].clients, ec)
EINA_INLIST_FOREACH(e_comp->layers[i].clients, ec)
{
if (!e_client_util_ignored_get(ec))
tmp = eina_list_append(tmp, ec);
@ -485,7 +495,7 @@ e_comp_canvas_fps_toggle(void)
conf->fps_show = !conf->fps_show;
e_comp_internal_save();
E_LIST_FOREACH(e_comp_list(), e_comp_render_queue);
e_comp_render_queue(e_comp);
}
EAPI E_Layer

View File

@ -22,10 +22,9 @@ EAPI void e_comp_all_thaw(void);
EAPI E_Zone * e_comp_zone_xy_get(const E_Comp *c, Evas_Coord x, Evas_Coord y);
EAPI E_Zone * e_comp_zone_number_get(E_Comp *c, int num);
EAPI E_Zone * e_comp_zone_id_get(E_Comp *c, int id);
EAPI E_Comp * e_comp_number_get(unsigned int num);
EAPI E_Desk * e_comp_desk_window_profile_get(E_Comp *c, const char *profile);
EAPI void e_comp_canvas_zone_update(E_Zone *zone);
EAPI void e_comp_canvas_update(E_Comp *c);
EAPI void e_comp_canvas_update(void);
EAPI void e_comp_canvas_fake_layers_init(E_Comp *comp);
EAPI void e_comp_canvas_fps_toggle(void);
EAPI E_Layer e_comp_canvas_layer_map_to(unsigned int layer);

View File

@ -468,8 +468,6 @@ static Eina_Bool
_e_comp_x_post_client_idler_cb(void *d EINA_UNUSED)
{
E_Client *ec;
const Eina_List *l;
E_Comp *c;
//INF("POST IDLER");
EINA_LIST_FREE(post_clients, ec)
@ -481,6 +479,7 @@ _e_comp_x_post_client_idler_cb(void *d EINA_UNUSED)
if (ec->post_move)
{
E_Client *tmp;
Eina_List *l;
EINA_LIST_FOREACH(ec->e.state.video_child, l, tmp)
{
@ -584,11 +583,10 @@ _e_comp_x_post_client_idler_cb(void *d EINA_UNUSED)
ec->post_move = 0;
ec->post_resize = 0;
}
EINA_LIST_FOREACH(e_comp_list(), l, c)
if (c->x_comp_data->restack && (!c->new_clients))
if (e_comp->x_comp_data->restack && (!e_comp->new_clients))
{
e_hints_client_stacking_set();
c->x_comp_data->restack = 0;
e_comp->x_comp_data->restack = 0;
}
_e_comp_x_post_client_idler = NULL;
return EINA_FALSE;
@ -1018,16 +1016,10 @@ _e_comp_x_destroy(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Wi
ec = _e_comp_x_client_find_by_window(ev->win);
if (!ec)
{
const Eina_List *l;
E_Comp *c;
EINA_LIST_FOREACH(e_comp_list(), l, c)
{
if (!c->x_comp_data->retry_clients) continue;
c->x_comp_data->retry_clients = eina_list_remove(c->x_comp_data->retry_clients, (uintptr_t*)(unsigned long)ev->win);
if (!c->x_comp_data->retry_clients)
E_FREE_FUNC(c->x_comp_data->retry_timer, ecore_timer_del);
}
if (!e_comp->x_comp_data->retry_clients) return ECORE_CALLBACK_RENEW;
e_comp->x_comp_data->retry_clients = eina_list_remove(e_comp->x_comp_data->retry_clients, (uintptr_t*)(unsigned long)ev->win);
if (!e_comp->x_comp_data->retry_clients)
E_FREE_FUNC(e_comp->x_comp_data->retry_timer, ecore_timer_del);
return ECORE_CALLBACK_PASS_ON;
}
if (ec->comp_data)
@ -1264,16 +1256,10 @@ _e_comp_x_hide(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Windo
ec = _e_comp_x_client_find_by_window(ev->win);
if (!ec)
{
const Eina_List *l;
E_Comp *c;
EINA_LIST_FOREACH(e_comp_list(), l, c)
{
if (!c->x_comp_data->retry_clients) continue;
c->x_comp_data->retry_clients = eina_list_remove(c->x_comp_data->retry_clients, (uintptr_t*)(unsigned long)ev->win);
if (!c->x_comp_data->retry_clients)
E_FREE_FUNC(c->x_comp_data->retry_timer, ecore_timer_del);
}
if (!e_comp->x_comp_data->retry_clients) return ECORE_CALLBACK_RENEW;
e_comp->x_comp_data->retry_clients = eina_list_remove(e_comp->x_comp_data->retry_clients, (uintptr_t*)(unsigned long)ev->win);
if (!e_comp->x_comp_data->retry_clients)
E_FREE_FUNC(e_comp->x_comp_data->retry_timer, ecore_timer_del);
return ECORE_CALLBACK_PASS_ON;
}
if ((!ec->visible) || (ec->hidden && ec->unredirected_single))
@ -2017,14 +2003,12 @@ _e_comp_x_state_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Ev
static Eina_Bool
_e_comp_x_mapping_change(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Mapping_Change *ev EINA_UNUSED)
{
const Eina_List *l, *ll;
const Eina_List *l;
E_Client *ec;
E_Comp *c;
if (_e_comp_x_mapping_change_disabled) return ECORE_CALLBACK_RENEW;
e_managers_keys_ungrab();
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->clients, ll, ec)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
Ecore_X_Window win;
@ -4625,16 +4609,15 @@ _e_comp_x_xinerama_setup(int rw, int rh)
}
static void
_e_comp_x_ee_resize(Ecore_Evas *ee)
_e_comp_x_ee_resize(Ecore_Evas *ee EINA_UNUSED)
{
E_Client *ec;
E_Comp *c = ecore_evas_data_get(ee, "comp");
ecore_x_netwm_desk_size_set(c->man->root, c->man->w, c->man->h);
_e_comp_x_xinerama_setup(c->man->w, c->man->h);
ecore_x_netwm_desk_size_set(e_comp->man->root, e_comp->man->w, e_comp->man->h);
_e_comp_x_xinerama_setup(e_comp->man->w, e_comp->man->h);
e_comp_canvas_update(c);
E_CLIENT_FOREACH(c, ec)
e_comp_canvas_update();
E_CLIENT_FOREACH(e_comp, ec)
{
if (!e_client_util_ignored_get(ec))
_e_comp_x_client_zone_geometry_set(ec);
@ -4856,45 +4839,34 @@ _e_comp_x_desklock_key_down(E_Comp *comp, int t EINA_UNUSED, Ecore_Event_Key *ev
static void
_e_comp_x_desklock_hide(void)
{
E_Comp *comp;
const Eina_List *l;
EINA_LIST_FOREACH(e_comp_list(), l, comp)
if (e_comp->x_comp_data->lock_win)
{
if (comp->x_comp_data->lock_win)
{
e_grabinput_release(comp->x_comp_data->lock_win, comp->x_comp_data->lock_win);
ecore_x_window_free(comp->x_comp_data->lock_win);
comp->x_comp_data->lock_win = 0;
e_grabinput_release(e_comp->x_comp_data->lock_win, e_comp->x_comp_data->lock_win);
ecore_x_window_free(e_comp->x_comp_data->lock_win);
e_comp->x_comp_data->lock_win = 0;
}
if (comp->x_comp_data->lock_grab_break_wnd)
ecore_x_window_show(comp->x_comp_data->lock_grab_break_wnd);
comp->x_comp_data->lock_grab_break_wnd = 0;
E_FREE_FUNC(comp->x_comp_data->lock_key_handler, ecore_event_handler_del);
e_comp_override_del(comp);
}
if (e_comp->x_comp_data->lock_grab_break_wnd)
ecore_x_window_show(e_comp->x_comp_data->lock_grab_break_wnd);
e_comp->x_comp_data->lock_grab_break_wnd = 0;
E_FREE_FUNC(e_comp->x_comp_data->lock_key_handler, ecore_event_handler_del);
e_comp_override_del(e_comp);
}
static Eina_Bool
_e_comp_x_desklock_show(void)
{
E_Comp *comp;
const Eina_List *l;
EINA_LIST_FOREACH(e_comp_list(), l, comp)
{
Ecore_X_Window win;
win = comp->x_comp_data->lock_win =
ecore_x_window_input_new(comp->man->root, 0, 0, 1, 1);
win = e_comp->x_comp_data->lock_win =
ecore_x_window_input_new(e_comp->man->root, 0, 0, 1, 1);
ecore_x_window_show(win);
if (!e_grabinput_get(win, 0, win))
{
Ecore_X_Window *windows;
int wnum, i;
windows = ecore_x_window_children_get(comp->man->root, &wnum);
windows = ecore_x_window_children_get(e_comp->man->root, &wnum);
if (!windows) goto fail;
for (i = 0; i < wnum; i++)
{
@ -4907,7 +4879,7 @@ _e_comp_x_desklock_show(void)
ecore_x_window_hide(windows[i]);
if (e_grabinput_get(win, 0, win))
{
comp->x_comp_data->lock_grab_break_wnd = windows[i];
e_comp->x_comp_data->lock_grab_break_wnd = windows[i];
free(windows);
goto works;
}
@ -4917,11 +4889,11 @@ _e_comp_x_desklock_show(void)
free(windows);
}
works:
e_comp_override_add(comp);
e_comp_ignore_win_add(E_PIXMAP_TYPE_X, comp->x_comp_data->lock_win);
comp->x_comp_data->lock_key_handler =
ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, (Ecore_Event_Handler_Cb)_e_comp_x_desklock_key_down, comp);
}
e_comp_override_add(e_comp);
e_comp_ignore_win_add(E_PIXMAP_TYPE_X, e_comp->x_comp_data->lock_win);
e_comp->x_comp_data->lock_key_handler =
ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, (Ecore_Event_Handler_Cb)_e_comp_x_desklock_key_down, e_comp);
return EINA_TRUE;
fail:
/* everything failed - can't lock */

View File

@ -173,17 +173,14 @@ e_desk_name_del(int manager, int zone, int desk_x, int desk_y)
EAPI void
e_desk_name_update(void)
{
const Eina_List *z, *l, *ll;
E_Comp *c;
const Eina_List *z, *l;
E_Zone *zone;
E_Desk *desk;
E_Config_Desktop_Name *cfname;
int d_x, d_y, ok;
char name[40];
EINA_LIST_FOREACH(e_comp_list(), l, c)
{
EINA_LIST_FOREACH(c->zones, z, zone)
EINA_LIST_FOREACH(e_comp->zones, z, zone)
{
for (d_x = 0; d_x < zone->desk_x_count; d_x++)
{
@ -192,10 +189,10 @@ e_desk_name_update(void)
desk = zone->desks[d_x + zone->desk_x_count * d_y];
ok = 0;
EINA_LIST_FOREACH(e_config->desktop_names, ll, cfname)
EINA_LIST_FOREACH(e_config->desktop_names, l, cfname)
{
if ((cfname->manager >= 0) &&
((int)c->num != cfname->manager)) continue;
((int)e_comp->num != cfname->manager)) continue;
if ((cfname->zone >= 0) &&
((int)zone->num != cfname->zone)) continue;
if ((cfname->desk_x != d_x) ||
@ -215,7 +212,6 @@ e_desk_name_update(void)
}
}
}
}
}
EAPI void
@ -615,8 +611,7 @@ e_desk_window_profile_del(int manager,
EAPI void
e_desk_window_profile_update(void)
{
const Eina_List *z, *l, *ll;
E_Comp *c;
const Eina_List *z, *l;
E_Zone *zone;
E_Desk *desk;
E_Config_Desktop_Window_Profile *cfprof;
@ -627,9 +622,7 @@ e_desk_window_profile_update(void)
if (!(e_config->use_desktop_window_profile))
return;
EINA_LIST_FOREACH(e_comp_list(), l, c)
{
EINA_LIST_FOREACH(c->zones, z, zone)
EINA_LIST_FOREACH(e_comp->zones, z, zone)
{
for (d_x = 0; d_x < zone->desk_x_count; d_x++)
{
@ -638,10 +631,10 @@ e_desk_window_profile_update(void)
desk = zone->desks[d_x + zone->desk_x_count * d_y];
ok = 0;
EINA_LIST_FOREACH(e_config->desktop_window_profiles, ll, cfprof)
EINA_LIST_FOREACH(e_config->desktop_window_profiles, l, cfprof)
{
if ((cfprof->manager >= 0) &&
((int)c->num != cfprof->manager)) continue;
((int)e_comp->num != cfprof->manager)) continue;
if ((cfprof->zone >= 0) &&
((int)zone->num != cfprof->zone)) continue;
if ((cfprof->desk_x != d_x) ||
@ -659,7 +652,6 @@ e_desk_window_profile_update(void)
}
}
}
}
}
EAPI void

View File

@ -209,7 +209,6 @@ EAPI int
e_desklock_show(Eina_Bool suspend)
{
const Eina_List *l;
E_Comp *comp;
E_Event_Desklock *ev;
E_Desklock_Show_Cb show_cb;
E_Desklock_Hide_Cb hide_cb;
@ -263,14 +262,13 @@ e_desklock_show(Eina_Bool suspend)
if (!show_cb()) goto fail;
}
EINA_LIST_FOREACH(e_comp_list(), l, comp)
{
Evas_Object *o;
o = evas_object_rectangle_add(comp->evas);
o = evas_object_rectangle_add(e_comp->evas);
block_rects = eina_list_append(block_rects, o);
evas_object_color_set(o, 0, 0, 0, 255);
evas_object_resize(o, comp->man->w, comp->man->h);
evas_object_resize(o, e_comp->man->w, e_comp->man->h);
evas_object_layer_set(o, E_LAYER_DESKLOCK);
evas_object_show(o);
}
@ -335,8 +333,8 @@ e_desklock_hide(void)
if ((!_e_desklock_state) && (!_e_custom_desklock_exe)) return;
E_LIST_FOREACH(e_comp_list(), e_comp_override_del);
E_LIST_FOREACH(e_comp_list(), e_comp_shape_queue);
e_comp_override_del(e_comp);
e_comp_shape_queue(e_comp);
E_FREE_LIST(block_rects, evas_object_del);
//e_comp_block_window_del();
if (e_config->desklock_language)

View File

@ -103,11 +103,6 @@ _e_drop_handler_active_check(E_Drop_Handler *h, const E_Drag *drag, Eina_Strings
EINTERN int
e_dnd_init(void)
{
#ifndef HAVE_WAYLAND_ONLY
E_Comp *c;
const Eina_List *l;
#endif
_type_text_uri_list = eina_stringshare_add("text/uri-list");
_type_xds = eina_stringshare_add("XdndDirectSave0");
_type_text_x_moz_url = eina_stringshare_add("text/x-moz-url");
@ -135,8 +130,7 @@ e_dnd_init(void)
E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_SELECTION_NOTIFY, _e_dnd_cb_event_dnd_selection, NULL);
E_LIST_HANDLER_APPEND(_event_handlers, ECORE_X_EVENT_WINDOW_HIDE, _e_dnd_cb_event_hide, NULL);
EINA_LIST_FOREACH(e_comp_list(), l, c)
e_drop_xdnd_register_set(c->ee_win, 1);
e_drop_xdnd_register_set(e_comp->ee_win, 1);
_action = ECORE_X_ATOM_XDND_ACTION_PRIVATE;
#endif

View File

@ -160,12 +160,10 @@ e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec,
if (dosingle)
{
const Eina_List *l, *ll;
const Eina_List *l;
E_Client *ec;
E_Comp *c;
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->clients, ll, ec)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
if (ec && (ec->desktop == desktop))
{

View File

@ -25,9 +25,8 @@ EAPI void
e_font_apply(void)
{
char buf[1024];
const Eina_List *l, *ll;
const Eina_List *l;
E_Client *ec;
E_Comp *c;
E_Font_Default *efd;
E_Font_Fallback *eff;
int blen, len;
@ -73,8 +72,8 @@ e_font_apply(void)
}
/* Update clients */
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->clients, ll, ec)
if (!e_comp) return;
EINA_LIST_FOREACH(e_comp->clients, l, ec)
e_client_frame_recalc(ec);
}

View File

@ -5764,8 +5764,7 @@ _e_gadcon_location_change(E_Gadcon_Client *gcc, E_Gadcon_Location *src, E_Gadcon
EAPI Eina_Bool
e_gadcon_client_visible_get(const E_Gadcon_Client *gcc, const E_Desk *desk)
{
const Eina_List *l, *ll;
E_Comp *c;
const Eina_List *l;
E_Zone *zone;
if (!gcc->gadcon) return EINA_FALSE;
@ -5775,16 +5774,14 @@ e_gadcon_client_visible_get(const E_Gadcon_Client *gcc, const E_Desk *desk)
return EINA_TRUE; // FIXME for when gadman allows per-desk gadgets
case E_GADCON_SITE_SHELF:
if (desk) return e_shelf_desk_visible(gcc->gadcon->shelf, desk);
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
if (e_shelf_desk_visible(gcc->gadcon->shelf, e_desk_current_get(zone)))
return EINA_TRUE;
break;
case E_GADCON_SITE_TOOLBAR:
case E_GADCON_SITE_EFM_TOOLBAR:
if (desk) return (e_win_client_get(gcc->gadcon->toolbar->fwin)->desk == desk);
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
if (e_win_client_get(gcc->gadcon->toolbar->fwin)->desk == e_desk_current_get(zone)) return EINA_TRUE;
default:
break;

View File

@ -333,17 +333,12 @@ e_hints_client_stacking_set(void)
{
#ifdef HAVE_WAYLAND_ONLY
#else
E_Comp *comp;
const Eina_List *l;
#define CLIENT_STACK_DEBUG
/* Get client count */
EINA_LIST_FOREACH(e_comp_list(), l, comp)
{
unsigned int c, i = 0, non_x = 0;
Ecore_X_Window *clients = NULL;
c = e_clients_count(comp);
#define CLIENT_STACK_DEBUG
/* Get client count */
c = e_clients_count(e_comp);
if (c)
{
E_Client *ec;
@ -351,7 +346,7 @@ e_hints_client_stacking_set(void)
Eina_List *ll = NULL;
#endif
clients = calloc(c, sizeof(Ecore_X_Window));
E_CLIENT_FOREACH(comp, ec)
E_CLIENT_FOREACH(e_comp, ec)
{
if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_X)
{
@ -372,7 +367,7 @@ e_hints_client_stacking_set(void)
if (i < c - non_x)
{
#ifdef CLIENT_STACK_DEBUG
Eina_List *lll = eina_list_clone(comp->clients);
Eina_List *lll = eina_list_clone(e_comp->clients);
EINA_LIST_FREE(ll, ec)
lll = eina_list_remove(lll, ec);
@ -387,9 +382,8 @@ e_hints_client_stacking_set(void)
* to be returned in the list
*/
if (i <= c)
ecore_x_netwm_client_list_stacking_set(comp->man->root, clients, c);
ecore_x_netwm_client_list_stacking_set(e_comp->man->root, clients, c);
free(clients);
}
#endif
}
@ -1630,13 +1624,10 @@ e_hints_scale_update(void)
{
#ifdef HAVE_WAYLAND_ONLY
#else
E_Comp *c;
const Eina_List *l;
unsigned int scale = e_scale * 1000;
EINA_LIST_FOREACH(e_comp_list(), l, c)
if (c->man->root)
ecore_x_window_prop_card32_set(c->man->root, ATM_ENLIGHTENMENT_SCALE, &scale, 1);
if (e_comp->man->root)
ecore_x_window_prop_card32_set(e_comp->man->root, ATM_ENLIGHTENMENT_SCALE, &scale, 1);
#endif
}

View File

@ -45,28 +45,13 @@ EAPI void
e_init_show(void)
{
Evas_Object *o;
E_Comp *c;
E_Zone *zone;
Eina_List *l;
/* exec init */
/* extra screens */
EINA_LIST_FOREACH(e_comp_list()->next, l, c)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
o = edje_object_add(c->evas);
e_theme_edje_object_set(o, NULL, "e/init/extra_screen");
evas_object_name_set(o, "_e_init_extra_screen");
evas_object_move(o, 0, 0);
evas_object_resize(o, c->man->w, c->man->h);
evas_object_layer_set(o, E_LAYER_MAX);
evas_object_show(o);
splash_objs = eina_list_append(splash_objs, o);
}
c = eina_list_data_get(e_comp_list());
EINA_LIST_FOREACH(c->zones, l, zone)
{
o = edje_object_add(c->evas);
o = edje_object_add(e_comp->evas);
if (!zone->num)
{
e_theme_edje_object_set(o, NULL, "e/init/splash");
@ -99,7 +84,7 @@ EAPI void
e_init_hide(void)
{
E_FREE_LIST(splash_objs, evas_object_del);
E_LIST_FOREACH(e_comp_list(), e_comp_shape_queue);
e_comp_shape_queue(e_comp);
_e_init_object = NULL;
E_FREE_FUNC(_e_init_timeout_timer, ecore_timer_del);
}

View File

@ -358,14 +358,12 @@ _warning_dialog_show(void)
static int
_check_matches(E_Remember *rem, int update)
{
const Eina_List *l, *ll;
const Eina_List *l;
E_Client *ec;
E_Comp *c;
const char *title;
int n = 0;
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->clients, ll, ec)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
int match = rem->match;
title = e_client_util_name_get(ec);

View File

@ -1589,40 +1589,32 @@ _e_main_screens_shutdown(void)
static void
_e_main_desk_save(void)
{
E_Comp *c;
const Eina_List *l;
char env[1024], name[1024];
EINA_LIST_FOREACH(e_comp_list(), l, c)
{
Eina_List *zl;
E_Zone *zone;
EINA_LIST_FOREACH(c->zones, zl, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
snprintf(name, sizeof(name), "DESK_%d_%d", c->num, zone->num);
snprintf(name, sizeof(name), "DESK_%d_%d", e_comp->num, zone->num);
snprintf(env, sizeof(env), "%d,%d", zone->desk_x_current, zone->desk_y_current);
e_util_env_set(name, env);
}
}
}
static void
_e_main_desk_restore(void)
{
E_Comp *c;
const Eina_List *l, *ll;
const Eina_List *l;
E_Zone *zone;
char *env;
char name[1024];
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
E_Desk *desk;
int desk_x, desk_y;
snprintf(name, sizeof(name), "DESK_%d_%d", c->num, zone->num);
snprintf(name, sizeof(name), "DESK_%d_%d", e_comp->num, zone->num);
env = getenv(name);
if (!env) continue;
if (!sscanf(env, "%d,%d", &desk_x, &desk_y)) continue;

View File

@ -424,8 +424,7 @@ static Eldbus_Message *
_e_msgbus_window_list_cb(const Eldbus_Service_Interface *iface __UNUSED__,
const Eldbus_Message *msg)
{
const Eina_List *l, *ll;
E_Comp *c;
const Eina_List *l;
E_Client *ec;
Eldbus_Message *reply;
Eldbus_Message_Iter *main_iter, *array;
@ -439,8 +438,7 @@ _e_msgbus_window_list_cb(const Eldbus_Service_Interface *iface __UNUSED__,
eldbus_message_iter_arguments_append(main_iter, "a(si)", &array);
EINA_SAFETY_ON_FALSE_RETURN_VAL(array, reply);
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->clients, ll, ec)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
Eldbus_Message_Iter *s;

View File

@ -89,10 +89,9 @@ e_remember_shutdown(void)
EAPI void
e_remember_internal_save(void)
{
const Eina_List *l, *ll;
const Eina_List *l;
E_Client *ec;
E_Remember *rem;
E_Comp *c;
//printf("internal save %d\n", restart);
if (!remembers)
@ -104,8 +103,7 @@ e_remember_internal_save(void)
remember_idler_list = eina_list_free(remember_idler_list);
}
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->clients, ll, ec)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
if ((!ec->internal) || e_client_util_ignored_get(ec)) continue;
@ -247,12 +245,10 @@ e_remember_unuse(E_Remember *rem)
EAPI void
e_remember_del(E_Remember *rem)
{
const Eina_List *l, *ll;
const Eina_List *l;
E_Client *ec;
E_Comp *c;
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->clients, ll, ec)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
if (ec->remember != rem) continue;

View File

@ -70,8 +70,7 @@ _e_sys_comp_done_cb(void *data, Evas_Object *obj, const char *sig, const char *s
static Eina_Bool
_e_sys_comp_action_timeout(void *data)
{
const Eina_List *l, *ll;
E_Comp *c;
const Eina_List *l;
E_Zone *zone;
E_Sys_Action a = (long)(intptr_t)data;
const char *sig = NULL;
@ -99,8 +98,7 @@ _e_sys_comp_action_timeout(void *data)
E_FREE_FUNC(action_timeout, ecore_timer_del);
if (sig)
{
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
edje_object_signal_callback_del(zone->over, sig, "e", _e_sys_comp_done_cb);
}
e_sys_action_raw_do(a, NULL);
@ -110,16 +108,13 @@ _e_sys_comp_action_timeout(void *data)
static void
_e_sys_comp_emit_cb_wait(E_Sys_Action a, const char *sig, const char *rep, Eina_Bool nocomp_push)
{
const Eina_List *l, *ll;
const Eina_List *l;
E_Zone *zone;
E_Comp *c;
Eina_Bool first = EINA_TRUE;
EINA_LIST_FOREACH(e_comp_list(), l, c)
{
if (nocomp_push) e_comp_override_add(c);
else e_comp_override_timed_pop(c);
EINA_LIST_FOREACH(c->zones, ll, zone)
if (nocomp_push) e_comp_override_add(e_comp);
else e_comp_override_timed_pop(e_comp);
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
e_zone_fade_handle(zone, nocomp_push, 0.5);
edje_object_signal_emit(zone->base, sig, "e");
@ -128,7 +123,6 @@ _e_sys_comp_emit_cb_wait(E_Sys_Action a, const char *sig, const char *rep, Eina_
edje_object_signal_callback_add(zone->over, rep, "e", _e_sys_comp_done_cb, (void *)(long)a);
first = EINA_FALSE;
}
}
if (rep)
{
if (action_timeout) ecore_timer_del(action_timeout);
@ -169,11 +163,7 @@ _e_sys_comp_logout(void)
static void
_e_sys_comp_resume(void)
{
const Eina_List *l;
E_Comp *c;
EINA_LIST_FOREACH(e_comp_list(), l, c)
evas_damage_rectangle_add(c->evas, 0, 0, c->man->w, c->man->h);
evas_damage_rectangle_add(e_comp->evas, 0, 0, e_comp->man->w, e_comp->man->h);
_e_sys_comp_emit_cb_wait(E_SYS_SUSPEND, "e,state,sys,resume", NULL, EINA_FALSE);
e_screensaver_deactivate();
}
@ -664,13 +654,10 @@ _e_sys_logout_confirm_dialog_update(int remaining)
static Eina_Bool
_e_sys_cb_logout_timer(void *data __UNUSED__)
{
const Eina_List *l;
E_Comp *c;
E_Client *ec;
int pending = 0;
EINA_LIST_FOREACH(e_comp_list(), l, c)
E_CLIENT_FOREACH(c, ec)
E_CLIENT_FOREACH(e_comp, ec)
{
if (e_client_util_ignored_get(ec)) continue;
if (!ec->internal) pending++;
@ -769,8 +756,7 @@ _e_sys_logout_after(void)
static void
_e_sys_logout_begin(E_Sys_Action a_after, Eina_Bool raw)
{
const Eina_List *l, *ll;
E_Comp *c;
const Eina_List *l;
E_Client *ec;
E_Obj_Dialog *od;
@ -790,8 +776,7 @@ _e_sys_logout_begin(E_Sys_Action a_after, Eina_Bool raw)
}
_e_sys_action_after = a_after;
_e_sys_action_after_raw = raw;
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->clients, ll, ec)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
e_client_act_close_begin(ec);
}

View File

@ -1,6 +1,6 @@
#include "e.h"
static void _e_test_internal(E_Comp *c);
static void _e_test_internal(void);
#ifdef DESKMIRROR_TEST
@ -30,7 +30,7 @@ deskmirror_test(void *d EINA_UNUSED)
EAPI void
e_test(void)
{
E_LIST_FOREACH(e_comp_list(), _e_test_internal);
_e_test_internal();
#ifdef DESKMIRROR_TEST
ecore_timer_add(2.0, deskmirror_test, NULL);
@ -67,7 +67,7 @@ _e_test_timer(void *data)
}
static void
_e_test_internal(E_Comp *c)
_e_test_internal(void)
{
_e_test_timer(NULL);
}
@ -92,12 +92,12 @@ _e_test_delete(E_Win *win)
}
static void
_e_test_internal(E_Comp *c)
_e_test_internal(void)
{
E_Win *win;
Evas_Object *o;
win = e_win_new(c);
win = e_win_new(e_comp);
evas_object_resize_callback_set(win, _e_test_resize);
e_win_delete_callback_set(win, _e_test_delete);
e_win_placed_set(win, 0);
@ -130,7 +130,7 @@ _e_test_timer(void *data)
}
static void
_e_test_internal(E_Comp *c)
_e_test_internal(void)
{
E_Menu *m;
Eina_List *l;
@ -157,7 +157,7 @@ _e_test_dialog_del(void *obj)
}
static void
_e_test_internal(E_Comp *c)
_e_test_internal(void)
{
E_Dialog *dia;
@ -188,7 +188,7 @@ _e_test_click(void *data, Evas *e, Evas_Object *obj, void *event_info)
}
static void
_e_test_internal(E_Comp *c)
_e_test_internal(void)
{
E_Dialog *dia;
Evas_Object *o, *o2, *o3;
@ -254,7 +254,7 @@ _e_test_timer(void *data)
}
static void
_e_test_internal(E_Comp *c)
_e_test_internal(void)
{
tcon = c;
_e_test_timer(NULL);
@ -293,7 +293,7 @@ _e_test_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
}
static void
_e_test_internal(E_Comp *c)
_e_test_internal(void)
{
E_Dialog *dia;
Evas_Coord mw, mh, vw, vh;
@ -381,7 +381,7 @@ _e_test_cb_e_smart_pan_changed_hook(void *data, Evas_Object *obj, void *event_in
}
static void
_e_test_internal(E_Comp *c)
_e_test_internal(void)
{
E_Dialog *dia;
Evas_Object *o;
@ -410,7 +410,7 @@ _e_test_internal(E_Comp *c)
#elif 0
static void
_e_test_internal(E_Comp *c)
_e_test_internal(void)
{
E_Dialog *dia;
Evas_Object *o;
@ -528,7 +528,7 @@ _e_test_cb_selected(void *data, Evas_Object *obj, void *event_info)
}
static void
_e_test_internal(E_Comp *c)
_e_test_internal(void)
{
E_Dialog *dia;
Evas_Object *ofm, *ofm2, *of, *ob, *ot;
@ -641,7 +641,7 @@ _e_test_cb_selected(void *data, Evas_Object *obj)
}
static void
_e_test_internal(E_Comp *c)
_e_test_internal(void)
{
E_Dialog *dia;
Evas_Object *o;
@ -674,7 +674,7 @@ _e_test_cb_ok(E_Color_Dialog *dia, E_Color *color, void *data)
}
static void
_e_test_internal(E_Comp *c)
_e_test_internal(void)
{
E_Color_Dialog *d;
@ -685,7 +685,7 @@ _e_test_internal(E_Comp *c)
#elif 0
static void
_e_test_internal(E_Comp *c)
_e_test_internal(void)
{
E_Dialog *dia;
Evas_Object *o, *ob, *of;
@ -754,7 +754,7 @@ _e_test_internal(E_Comp *c)
}
static void
_e_test_internal(E_Comp *c)
_e_test_internal(void)
{
ecore_timer_add(1.0, _e_test_timer, c);
}
@ -821,7 +821,7 @@ _e_test_timer(void *data)
}
static void
_e_test_internal(E_Comp *c)
_e_test_internal(void)
{
ecore_timer_add(1.0, _e_test_timer, c);
}
@ -888,14 +888,14 @@ _e_test_timer(void *data)
}
static void
_e_test_internal(E_Comp *c)
_e_test_internal(void)
{
ecore_timer_add(1.0, _e_test_timer, c);
}
#else
static void
_e_test_internal(E_Comp *c __UNUSED__)
_e_test_internal(void)
{
}

View File

@ -103,21 +103,13 @@ e_util_glob_case_match(const char *str, const char *pattern)
EAPI E_Zone *
e_util_comp_zone_number_get(int c_num, int zone_num)
{
E_Comp *c;
c = e_comp_number_get(c_num);
if (!c) return NULL;
return e_comp_zone_number_get(c, zone_num);
return e_comp_zone_number_get(e_comp, zone_num);
}
EAPI E_Zone *
e_util_comp_zone_id_get(int c_num, int id)
{
E_Comp *c;
c = e_comp_number_get(c_num);
if (!c) return NULL;
return e_comp_zone_id_get(c, id);
return e_comp_zone_id_get(e_comp, id);
}
EAPI int
@ -202,7 +194,7 @@ e_util_immortal_check(void)
{
Eina_List *wins;
wins = e_clients_immortal_list(NULL);
wins = e_clients_immortal_list();
if (wins)
{
e_util_dialog_show(_("Cannot exit - immortal windows."),
@ -1019,14 +1011,11 @@ EAPI Eina_Bool
e_util_fullscreen_any(void)
{
E_Zone *zone;
const Eina_List *lc, *lz;
E_Comp *c;
const Eina_List *lz;
E_Desk *desk;
int x, y;
EINA_LIST_FOREACH(e_comp_list(), lc, c)
{
EINA_LIST_FOREACH(c->zones, lz, zone)
EINA_LIST_FOREACH(e_comp->zones, lz, zone)
{
if (zone->fullscreen > 0) return EINA_TRUE;
@ -1038,7 +1027,6 @@ e_util_fullscreen_any(void)
return EINA_TRUE;
}
}
}
return EINA_FALSE;
}

View File

@ -17,8 +17,8 @@ EAPI void e_util_env_set(const char *var, const char *val);
EAPI E_Zone *e_util_zone_current_get(E_Manager *man);
EAPI int e_util_glob_match(const char *str, const char *glob);
EAPI int e_util_glob_case_match(const char *str, const char *glob);
EAPI E_Zone *e_util_comp_zone_id_get(int con_num, int id);
EAPI E_Zone *e_util_comp_zone_number_get(int con_num, int zone_num);
EINA_DEPRECATED EAPI E_Zone *e_util_comp_zone_id_get(int con_num, int id);
EINA_DEPRECATED EAPI E_Zone *e_util_comp_zone_number_get(int con_num, int zone_num);
EAPI int e_util_head_exec(int head, const char *cmd);
EAPI int e_util_strcasecmp(const char *s1, const char *s2);
EAPI int e_util_strcmp(const char *s1, const char *s2);

View File

@ -86,7 +86,6 @@ _e_elm_win_trap_show(void *data, Evas_Object *o)
else
{
E_Pixmap *cp;
E_Comp *c = NULL;
const char *title;
ecore_evas_name_class_set(ee, "E", "_e_internal_window");
@ -97,18 +96,7 @@ _e_elm_win_trap_show(void *data, Evas_Object *o)
cp = e_pixmap_new(type, win);
EINA_SAFETY_ON_NULL_RETURN_VAL(cp, EINA_TRUE);
/* if (eina_list_count(e_comp_list()) > 1) */
/* { */
/* #ifndef HAVE_WAYLAND_ONLY */
/* c = e_comp_find_by_window(ecore_x_window_root_get(win)); */
/* #else */
/* c = ; */
/* #endif */
/* } */
if (!c)
c = e_comp_get(NULL);
ctx->client = e_client_new(c, cp, 0, 1);
ctx->client = e_client_new(e_comp, cp, 0, 1);
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx->client, EINA_TRUE);
}
ctx->client->placed = ctx->placed | ctx->centered;

View File

@ -373,12 +373,10 @@ _e_xsettings_update(void)
static void
_e_xsettings_gtk_icon_update(void)
{
const Eina_List *l, *ll;
const Eina_List *l;
E_Client *ec;
E_Comp *c;
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->clients, ll, ec)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
if (ec->icccm.state)
ecore_x_client_message8_send(e_client_util_win_get(ec),
_atom_gtk_iconthemes, NULL, 0);
@ -387,12 +385,10 @@ _e_xsettings_gtk_icon_update(void)
static void
_e_xsettings_gtk_rcfiles_update(void)
{
const Eina_List *l, *ll;
const Eina_List *l;
E_Client *ec;
E_Comp *c;
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->clients, ll, ec)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
if (ec->icccm.state)
ecore_x_client_message8_send(e_client_util_win_get(ec),
_atom_gtk_rcfiles, NULL, 0);

View File

@ -65,12 +65,10 @@ e_zone_shutdown(void)
EAPI void
e_zone_all_edge_flip_eval(void)
{
const Eina_List *l, *ll;
E_Comp *c;
const Eina_List *l;
E_Zone *zone;
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(c->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
e_zone_edge_flip_eval(zone);
}
@ -502,8 +500,6 @@ e_zone_flip_coords_handle(E_Zone *zone,
if (next_zone->y != cy) one_row = 0;
}
}
if (eina_list_count(e_comp_list()) > 1)
goto noflip;
if (!E_INSIDE(x, y, zone->x, zone->y, zone->w, zone->h))
goto noflip;
if ((one_row) && (y == 0))
@ -808,13 +804,10 @@ e_zone_desk_linear_flip_to(E_Zone *zone,
EAPI void
e_zone_edge_enable(void)
{
const Eina_List *l, *ll;
E_Comp *c;
const Eina_List *l;
E_Zone *zone;
EINA_LIST_FOREACH(e_comp_list(), l, c)
{
EINA_LIST_FOREACH(c->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
if (zone->edge.left) evas_object_show(zone->edge.left);
if (zone->edge.right) evas_object_show(zone->edge.right);
@ -830,19 +823,15 @@ e_zone_edge_enable(void)
if (zone->corner.left_bottom) evas_object_show(zone->corner.left_bottom);
e_zone_edge_flip_eval(zone);
}
}
}
EAPI void
e_zone_edge_disable(void)
{
const Eina_List *l, *ll;
E_Comp *c;
const Eina_List *l;
E_Zone *zone;
EINA_LIST_FOREACH(e_comp_list(), l, c)
{
EINA_LIST_FOREACH(c->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
zone->flip.switching = E_ZONE_EDGE_NONE;
if (zone->edge.left) evas_object_hide(zone->edge.left);
@ -858,7 +847,6 @@ e_zone_edge_disable(void)
if (zone->corner.bottom_left) evas_object_hide(zone->corner.bottom_left);
if (zone->corner.left_bottom) evas_object_hide(zone->corner.left_bottom);
}
}
}
EAPI void
@ -1015,20 +1003,13 @@ e_zone_edge_flip_eval(E_Zone *zone)
EAPI void
e_zone_edge_new(E_Zone_Edge edge)
{
const Eina_List *l, *ll;
E_Comp *c;
const Eina_List *l;
E_Zone *zone;
int cw, ch;
if (edge == E_ZONE_EDGE_NONE) return;
// configurably disallow edge bindings when we have more than 1 root
// window (ie pure old multihead) since we don't know which direction
// other root windows are in
if ((!e_config->multiscreen_flip) && (eina_list_count(e_comp_list()) > 1)) return;
EINA_LIST_FOREACH(e_comp_list(), l, c)
{
EINA_LIST_FOREACH(c->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
// don't allow bindings on edges that are on the boundary
// between zones
@ -1040,7 +1021,7 @@ e_zone_edge_new(E_Zone_Edge edge)
#define EDGE_NEW(MEMBER, X, Y, W, H) do { \
if (!zone->MEMBER) \
{ \
zone->MEMBER = evas_object_rectangle_add(c->evas); \
zone->MEMBER = evas_object_rectangle_add(e_comp->evas); \
evas_object_name_set(zone->MEMBER, #MEMBER); \
evas_object_move(zone->MEMBER, (X), (Y)); \
evas_object_resize(zone->MEMBER, (W), (H)); \
@ -1089,20 +1070,16 @@ e_zone_edge_new(E_Zone_Edge edge)
else
e_zone_edge_win_layer_set(zone, E_LAYER_CLIENT_EDGE);
}
}
}
EAPI void
e_zone_edge_free(E_Zone_Edge edge)
{
const Eina_List *l, *ll;
E_Comp *c;
const Eina_List *l;
E_Zone *zone;
if (edge == E_ZONE_EDGE_NONE) return;
EINA_LIST_FOREACH(e_comp_list(), l, c)
{
EINA_LIST_FOREACH(c->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
if (zone->flip.switching == edge)
zone->flip.switching = E_ZONE_EDGE_NONE;
@ -1149,7 +1126,6 @@ e_zone_edge_free(E_Zone_Edge edge)
break;
}
}
}
}
EAPI void

View File

@ -783,21 +783,17 @@ _cover_new(E_Zone *zone)
static void
_covers_init(void)
{
const Eina_List *l, *l2;
E_Comp *comp;
const Eina_List *l;
int i = 0;
EINA_LIST_FOREACH(e_comp_list(), l, comp)
{
E_Zone *zone;
EINA_LIST_FOREACH(comp->zones, l2, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
Cover *cov = _cover_new(zone);
if (!cov) continue;
covers = eina_list_append(covers, cov);
for (i = 0; i < HISTORY_MAX; i++) cov->mouse_history[i] = -1;
}
}
}
static void

View File

@ -187,8 +187,7 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
static int
_basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
const Eina_List *l, *ll;
E_Comp *comp;
const Eina_List *l;
E_Zone *zone;
E_Config_Binding_Edge *bi, *bi2;
E_Layer layer;
@ -231,12 +230,9 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
else
layer = E_LAYER_CLIENT_EDGE;
EINA_LIST_FOREACH(e_comp_list(), l, comp)
{
EINA_LIST_FOREACH(comp->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
e_zone_edge_win_layer_set(zone, layer);
}
}
e_config->fullscreen_flip = cfdata->fullscreen_flip;

View File

@ -11,7 +11,6 @@ static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dia
static void _cb_method_change(void *data, Evas_Object *obj, void *event_info);
static void _login_method_change(void *data, Evas_Object *obj, void *event_info);
static void _cb_login_change(void *data, Evas_Object *obj);
static int _zone_count_get(void);
static void _cb_bg_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event);
@ -133,7 +132,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
E_Config_Desklock_Background *bg;
int x;
cfdata->zone_count = _zone_count_get();
cfdata->zone_count = eina_list_count(e_comp->zones);
EINA_LIST_FOREACH(e_config->desklock_backgrounds, l, bg)
cfdata->bgs = eina_list_append(cfdata->bgs, desklock_bg_dup(bg, NULL));
if (!cfdata->bgs)
@ -216,10 +215,9 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data
E_Config_XKB_Layout *cl;
int grp = 0;
Evas_Object *otb, *ol, *ow, *of, *oc;
const Eina_List *l, *ll;
const Eina_List *l;
E_Zone *zone;
E_Radio_Group *rg;
E_Comp *comp;
int screen_count, x = 0;
e_dialog_resizable_set(cfd->dia, 1);
@ -406,8 +404,7 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data
cfdata->gui.o_table = e_widget_table_add(evas, 1);
EINA_LIST_FOREACH(e_comp_list(), l, comp)
EINA_LIST_FOREACH(comp->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
ow = e_widget_preview_add(evas, 100, 140);
cfdata->gui.bgs = eina_list_append(cfdata->gui.bgs, ow);
@ -748,18 +745,6 @@ _cb_login_change(void *data, Evas_Object *obj __UNUSED__)
e_widget_disabled_set(cfdata->gui.loginbox_slider, (cfdata->login_zone < 0));
}
static int
_zone_count_get(void)
{
int num = 0;
const Eina_List *l;
E_Comp *comp;
EINA_LIST_FOREACH(e_comp_list(), l, comp)
num += eina_list_count(comp->zones);
return num;
}
static void
_cb_bg_mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event __UNUSED__)
{

View File

@ -117,12 +117,10 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
if ((cfdata->x != e_config->zone_desks_x_count) ||
(cfdata->y != e_config->zone_desks_y_count))
{
const Eina_List *l, *ll;
E_Comp *comp;
const Eina_List *l;
E_Zone *zone;
EINA_LIST_FOREACH(e_comp_list(), l, comp)
EINA_LIST_FOREACH(comp->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
e_zone_desk_count_set(zone, cfdata->x, cfdata->y);
}
@ -146,12 +144,10 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
static int
_basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
const Eina_List *l, *ll;
E_Comp *comp;
const Eina_List *l;
E_Zone *zone;
EINA_LIST_FOREACH(e_comp_list(), l, comp)
EINA_LIST_FOREACH(comp->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
int x, y;

View File

@ -98,9 +98,6 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
static int
_basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
const Eina_List *l;
E_Comp *comp;
e_config->use_e_cursor = cfdata->use_e_cursor;
e_config->show_cursor = cfdata->show_cursor;
e_config->idle_cursor = cfdata->idle_cursor;
@ -113,13 +110,10 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
e_config_save_queue();
/* Apply the above settings */
EINA_LIST_FOREACH(e_comp_list(), l, comp)
{
if ((comp->comp_type == E_PIXMAP_TYPE_X) && (!e_config->show_cursor))
e_pointer_hide(comp->pointer);
if ((e_comp->comp_type == E_PIXMAP_TYPE_X) && (!e_config->show_cursor))
e_pointer_hide(e_comp->pointer);
else
e_pointers_size_set(e_config->cursor_size);
}
e_mouse_update();

View File

@ -36,19 +36,15 @@ static Eina_List *handlers = NULL;
void
e_edges_init(void)
{
const Eina_List *l, *ll;
E_Comp *comp;
const Eina_List *l;
E_Zone *zone;
EINA_LIST_FOREACH(e_comp_list(), l, comp)
{
EINA_LIST_FOREACH(comp->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
Edgeset *es = _edgeset_new(zone);
if (es) edges = eina_list_append(edges, es);
}
}
}
void

View File

@ -52,14 +52,12 @@ e_policy_shutdown(void)
void
e_policy_kbd_override_set(Eina_Bool override)
{
const Eina_List *l, *ll;
const Eina_List *l;
E_Client *ec, *kbd = NULL;;
E_Comp *comp;
if (kbd_override == override) return;
kbd_override = override;
EINA_LIST_FOREACH(e_comp_list(), l, comp)
EINA_LIST_FOREACH(comp->clients, ll, ec)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
if (ec->vkbd.vkbd)
{

View File

@ -560,7 +560,6 @@ void
e_fwin_reload_all(void)
{
const Eina_List *l, *ll;
E_Comp *comp;
E_Fwin *fwin;
E_Zone *zone;
@ -621,8 +620,7 @@ e_fwin_reload_all(void)
}
/* Hook into zones */
EINA_LIST_FOREACH(e_comp_list(), l, comp)
EINA_LIST_FOREACH(comp->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
if (e_fwin_zone_find(zone)) continue;
if (e_config->show_desktop_icons)

View File

@ -30,8 +30,7 @@ EAPI E_Module_Api e_modapi =
EAPI void *
e_modapi_init(E_Module *m)
{
const Eina_List *l, *ll;
E_Comp *comp;
const Eina_List *l;
E_Zone *zone;
conf_module = m;
@ -65,8 +64,7 @@ e_modapi_init(E_Module *m)
e_fwin_init();
/* Hook into zones */
EINA_LIST_FOREACH(e_comp_list(), l, comp)
EINA_LIST_FOREACH(comp->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
if (e_fwin_zone_find(zone)) continue;
if (e_config->show_desktop_icons)
@ -87,8 +85,7 @@ e_modapi_init(E_Module *m)
EAPI int
e_modapi_shutdown(E_Module *m __UNUSED__)
{
const Eina_List *l, *ll;
E_Comp *comp;
const Eina_List *l;
E_Zone *zone;
E_Config_Dialog *cfd;
@ -98,8 +95,7 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
zone_add_handler = NULL;
/* Unhook zone fm */
EINA_LIST_FOREACH(e_comp_list(), l, comp)
EINA_LIST_FOREACH(comp->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
e_fwin_zone_shutdown(zone);
e_fwin_nav_shutdown();

View File

@ -88,8 +88,6 @@ _basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dial
E_Radio_Group *rg;
Evas_Object *o, *of, *ob;
Evas_Object *show_check = NULL;
E_Comp *comp;
const Eina_List *l;
int zone_count = 0;
o = e_widget_list_add(evas, 0, 0);
@ -134,8 +132,7 @@ _basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dial
of = e_widget_framelist_add(evas, _("Screen"), 0);
EINA_LIST_FOREACH(e_comp_list(), l, comp)
zone_count += eina_list_count(comp->zones);
zone_count = eina_list_count(e_comp->zones);
if (zone_count <= 1) cfdata->zone_policy = 1;

View File

@ -15,8 +15,6 @@ EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Illume2" };
EAPI void *
e_modapi_init(E_Module *m)
{
const Eina_List *cl, *zl;
E_Comp *comp;
E_Zone *zone;
Ecore_X_Window *zones;
int zcount = 0;
@ -65,9 +63,7 @@ e_modapi_init(E_Module *m)
e_mod_kbd_hide();
/* loop zones and get count */
EINA_LIST_FOREACH(e_comp_list(), cl, comp)
EINA_LIST_FOREACH(comp->zones, zl, zone)
zcount++;
zcount = eina_list_count(e_comp->zones);
/* allocate enough zones */
zones = calloc(zcount, sizeof(Ecore_X_Window));
@ -93,9 +89,7 @@ e_modapi_init(E_Module *m)
zcount = 0;
/* loop the zones and create quickpanels for each one */
EINA_LIST_FOREACH(e_comp_list(), cl, comp)
{
EINA_LIST_FOREACH(comp->zones, zl, zone)
EINA_LIST_FOREACH(e_comp->zones, zl, zone)
{
E_Illume_Quickpanel *qp;
@ -115,7 +109,6 @@ e_modapi_init(E_Module *m)
* elm apps like elm_indicator so that they know how many
* indicators to create at startup */
ecore_x_e_illume_zone_list_set(comp->man->root, zones, zcount);
}
/* free zones variable */
free(zones);

View File

@ -42,19 +42,6 @@ lokker_is_pin(void)
return e_config->desklock_auth_method == E_DESKLOCK_AUTH_METHOD_PIN;
}
static int
_zone_count_get(void)
{
int num = 0;
const Eina_List *l;
E_Comp *comp;
EINA_LIST_FOREACH(e_comp_list(), l, comp)
num += eina_list_count(comp->zones);
return num;
}
static void
_lokker_state_set(int state)
{
@ -316,7 +303,7 @@ _text_login_box_add(Lokker_Popup *lp)
zone = lp->zone;
last_active_zone = current_zone = e_util_zone_current_get(e_manager_current_get());
total_zone_num = _zone_count_get();
total_zone_num = eina_list_count(e_comp->zones);
if (total_zone_num > 1)
{
if ((e_config->desklock_login_box_zone == -2) && (zone != current_zone))
@ -424,7 +411,7 @@ _lokker_popup_add(E_Zone *zone)
evas_object_clip_set(lp->comp_object, lp->zone->bg_clip_object);
last_active_zone = current_zone = e_util_zone_current_get(e_manager_current_get());
total_zone_num = _zone_count_get();
total_zone_num = eina_list_count(e_comp->zones);
if (total_zone_num > 1)
{
if ((e_config->desklock_login_box_zone == -2) && (zone != current_zone))
@ -775,8 +762,6 @@ EINTERN Eina_Bool
lokker_lock(void)
{
int total_zone_num = 0;
const Eina_List *l;
E_Comp *comp;
if (edd) return EINA_TRUE;
@ -791,11 +776,8 @@ lokker_lock(void)
edd = E_NEW(Lokker_Data, 1);
if (!edd) return EINA_FALSE;
EINA_LIST_FOREACH(e_comp_list(), l, comp)
{
E_LIST_FOREACH(comp->zones, _lokker_popup_add);
total_zone_num += eina_list_count(comp->zones);
}
E_LIST_FOREACH(e_comp->zones, _lokker_popup_add);
total_zone_num = eina_list_count(e_comp->zones);
/* handlers */
E_LIST_HANDLER_APPEND(edd->handlers, ECORE_EVENT_KEY_DOWN, _lokker_cb_key_down, NULL);

View File

@ -181,14 +181,12 @@ _notification_theme_cb_find(Popup_Data *popup,
const char *emission __UNUSED__,
const char *source __UNUSED__)
{
const Eina_List *l, *ll;
const Eina_List *l;
E_Client *ec;
E_Comp *comp;
if (!popup->app_name) return;
EINA_LIST_FOREACH(e_comp_list(), l, comp)
EINA_LIST_FOREACH(comp->clients, ll, ec)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
size_t len, test;
const char *name;

View File

@ -1734,7 +1734,6 @@ _pager_cb_event_bg_update(void *data __UNUSED__, int type __UNUSED__, void *even
Eina_List *l, *ll;
Pager *p;
Pager_Desk *pd;
E_Comp *comp;
E_Zone *zone;
E_Desk *desk;
@ -1745,9 +1744,7 @@ _pager_cb_event_bg_update(void *data __UNUSED__, int type __UNUSED__, void *even
_pager_desk_livethumb_setup(pd);
return ECORE_CALLBACK_RENEW;
}
comp = eina_list_nth(e_comp_list(), ev->manager);
if (!comp) return ECORE_CALLBACK_RENEW;
zone = eina_list_nth(comp->zones, ev->zone);
zone = eina_list_nth(e_comp->zones, ev->zone);
if (!zone) return ECORE_CALLBACK_RENEW;
desk = e_desk_at_xy_get(zone, ev->desk_x, ev->desk_y);
if (!zone) return ECORE_CALLBACK_RENEW;

View File

@ -84,7 +84,6 @@ _pol_cfd_data_free(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdat
static int
_pol_cfd_data_basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
{
E_Comp *comp;
E_Zone *zone;
E_Desk *desk;
Pol_Softkey *softkey;
@ -133,8 +132,7 @@ _pol_cfd_data_basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data
EINA_LIST_FOREACH(cfdata->conf->desks, l, d)
{
comp = e_comp_number_get(d->comp_num);
zone = e_comp_zone_number_get(comp, d->zone_num);
zone = e_comp_zone_number_get(e_comp, d->zone_num);
desk = e_desk_at_xy_get(zone, d->x, d->y);
if (!desk) continue;

View File

@ -422,10 +422,8 @@ void
e_mod_pol_desk_add(E_Desk *desk)
{
Pol_Desk *pd;
E_Comp *comp;
E_Client *ec;
Pol_Softkey *softkey;
const Eina_List *l;
pd = eina_hash_find(hash_pol_desks, &desk);
if (pd) return;
@ -437,8 +435,7 @@ e_mod_pol_desk_add(E_Desk *desk)
eina_hash_add(hash_pol_desks, &desk, pd);
/* add clients */
EINA_LIST_FOREACH(e_comp_list(), l, comp)
E_CLIENT_FOREACH(comp, ec)
E_CLIENT_FOREACH(e_comp, ec)
{
if (pd->desk == ec->desk)
_pol_client_add(ec);
@ -534,10 +531,9 @@ EAPI void *
e_modapi_init(E_Module *m)
{
Mod *mod;
E_Comp *comp;
E_Zone *zone;
Config_Desk *d;
const Eina_List *l, *ll;
const Eina_List *l;
int i, n;
char buf[PATH_MAX];
@ -560,15 +556,14 @@ e_modapi_init(E_Module *m)
e_mod_pol_conf_init(mod);
EINA_LIST_FOREACH(e_comp_list(), l, comp)
EINA_LIST_FOREACH(comp->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
//Eina_Bool home_add = EINA_FALSE;
n = zone->desk_y_count * zone->desk_x_count;
for (i = 0; i < n; i++)
{
d = e_mod_pol_conf_desk_get_by_nums(_pol_mod->conf,
comp->num,
e_comp->num,
zone->num,
zone->desks[i]->x,
zone->desks[i]->y);

View File

@ -592,13 +592,10 @@ _e_qa_begin(void)
}
if (count)
{
E_Comp *comp;
const Eina_List *lll;
/* some non-transient entries exist without assigned borders
* try assigning from existing borders
*/
EINA_LIST_FOREACH(e_comp_list(), lll, comp)
EINA_LIST_FOREACH(comp->clients, l, ec)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
if (e_client_util_ignored_get(ec)) continue;
entry = _e_qa_entry_find_match(ec, 1);

View File

@ -1535,15 +1535,12 @@ _disable_all_tiling(void)
static void
_foreach_desk(void (*func)(E_Desk *desk))
{
const Eina_List *l, *ll;
E_Comp *comp;
const Eina_List *l;
E_Zone *zone;
E_Desk *desk;
int x, y;
EINA_LIST_FOREACH(e_comp_list(), l, comp)
{
EINA_LIST_FOREACH(comp->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
for (x = 0; x < zone->desk_x_count; x++)
{
@ -1555,7 +1552,6 @@ _foreach_desk(void (*func)(E_Desk *desk))
}
}
}
}
}
EAPI int

View File

@ -34,20 +34,16 @@ static Ecore_Timer *next_timer = NULL;
EAPI int
e_wizard_init(void)
{
E_Comp *comp;
E_Zone *zone;
const Eina_List *l, *ll;
const Eina_List *l;
EINA_LIST_FOREACH(e_comp_list(), l, comp)
{
EINA_LIST_FOREACH(comp->zones, ll, zone)
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
if (!pop)
pop = _e_wizard_main_new(zone);
else
pops = eina_list_append(pops, _e_wizard_extra_new(zone));
}
}
E_LIST_HANDLER_APPEND(handlers, EFREET_EVENT_DESKTOP_CACHE_BUILD,
_e_wizard_cb_desktops_update, NULL);