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) \ #define DESK_ACTION_ALL(zone, act) \
E_Zone * zone; \ E_Zone * zone; \
const Eina_List *lc, *lz; \ const Eina_List *lz; \
E_Comp *c; \
\ \
EINA_LIST_FOREACH(e_comp_list(), lc, c) { \ EINA_LIST_FOREACH(e_comp->zones, lz, zone) { \
EINA_LIST_FOREACH(c->zones, lz, zone) { \
act; \ act; \
} \ } \
}
/***************************************************************************/ /***************************************************************************/
ACT_FN_GO(desk_flip_by_all, ) 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) \ #define ZONE_DESK_ACTION(con_num, zone_num, zone, act) \
E_Zone * zone; \ E_Zone * zone; \
if ((con_num < 0) || (zone_num < 0)) { \ if ((con_num < 0) || (zone_num < 0)) { \
Eina_List *l, *ll; \ Eina_List *l; \
E_Comp *c; \
if ((con_num >= 0) && (zone_num < 0)) /* con=1 zone=all */ { \ if ((con_num >= 0) && (zone_num < 0)) /* con=1 zone=all */ { \
c = e_util_comp_number_get(con_num); \ EINA_LIST_FOREACH(e_comp->zones, l, zone) { \
EINA_LIST_FOREACH(c->zones, l, zone) { \
act; \ act; \
} } \ } } \
else if ((con_num < 0) && (zone_num >= 0)) /* c=all zone=1 */ { \ 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); \ zone = e_comp_zone_number_get(c, zone_num); \
if (zone) \ if (zone) \
act; \ act; \
} } \ } \
else if ((con_num < 0) && (zone_num < 0)) /* c=all zone=all */ { \ else if ((con_num < 0) && (zone_num < 0)) /* c=all zone=all */ { \
EINA_LIST_FOREACH(e_comp_list(), l, c) { \ EINA_LIST_FOREACH(e_comp->zones, lll, zone) { \
EINA_LIST_FOREACH(c->zones, lll, zone) { \
act; \ act; \
} } } } } \ } } } \
else { \ else { \
zone = e_util_comp_zone_number_get(con_num, zone_num); \ zone = e_util_comp_zone_number_get(con_num, zone_num); \
if (zone) act; \ if (zone) act; \

View File

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

View File

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

View File

@ -86,45 +86,40 @@ static Eina_Inlist *_e_client_hooks[] =
static Eina_Bool static Eina_Bool
_e_client_cb_efreet_cache_update(void *data EINA_UNUSED, int type EINA_UNUSED, void *ev EINA_UNUSED) _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;
const Eina_List *l, *ll;
E_Client *ec; E_Client *ec;
/* mark all clients for desktop/icon updates */ /* mark all clients for desktop/icon updates */
EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(e_comp->clients, l, ec)
EINA_LIST_FOREACH(c->clients, ll, ec) {
{ E_FREE_FUNC(ec->desktop, efreet_desktop_free);
E_FREE_FUNC(ec->desktop, efreet_desktop_free); if (e_object_is_del(E_OBJECT(ec))) continue;
if (e_object_is_del(E_OBJECT(ec))) continue; ec->changes.icon = 1;
ec->changes.icon = 1; EC_CHANGED(ec);
EC_CHANGED(ec); }
}
return ECORE_CALLBACK_RENEW; return ECORE_CALLBACK_RENEW;
} }
static Eina_Bool static Eina_Bool
_e_client_cb_config_icon_theme(void *data EINA_UNUSED, int type EINA_UNUSED, void *ev EINA_UNUSED) _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;
const Eina_List *l, *ll;
E_Client *ec; E_Client *ec;
/* mark all clients for desktop/icon updates */ /* mark all clients for desktop/icon updates */
EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(e_comp->clients, l, ec)
EINA_LIST_FOREACH(c->clients, ll, ec) {
{ if (e_object_is_del(E_OBJECT(ec))) continue;
if (e_object_is_del(E_OBJECT(ec))) continue; ec->changes.icon = 1;
ec->changes.icon = 1; EC_CHANGED(ec);
EC_CHANGED(ec); }
}
return ECORE_CALLBACK_RENEW; return ECORE_CALLBACK_RENEW;
} }
static Eina_Bool static Eina_Bool
_e_client_cb_config_mode(void *data EINA_UNUSED, int type EINA_UNUSED, void *ev EINA_UNUSED) _e_client_cb_config_mode(void *data EINA_UNUSED, int type EINA_UNUSED, void *ev EINA_UNUSED)
{ {
E_Comp *c; const Eina_List *l;
const Eina_List *l, *ll;
E_Client *ec; E_Client *ec;
E_Layer layer; E_Layer layer;
@ -137,17 +132,16 @@ _e_client_cb_config_mode(void *data EINA_UNUSED, int type EINA_UNUSED, void *ev
else else
return ECORE_CALLBACK_RENEW; return ECORE_CALLBACK_RENEW;
EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(e_comp->clients, l, ec)
EINA_LIST_FOREACH(c->clients, ll, ec) {
{ if (e_object_is_del(E_OBJECT(ec))) continue;
if (e_object_is_del(E_OBJECT(ec))) continue; if ((ec->fullscreen) || (ec->need_fullscreen))
if ((ec->fullscreen) || (ec->need_fullscreen)) {
{ ec->fullscreen = 0;
ec->fullscreen = 0; evas_object_layer_set(ec->frame, layer);
evas_object_layer_set(ec->frame, layer); ec->fullscreen = 1;
ec->fullscreen = 1; }
} }
}
return ECORE_CALLBACK_PASS_ON; return ECORE_CALLBACK_PASS_ON;
} }
@ -163,17 +157,15 @@ _e_client_cb_pointer_warp(void *data EINA_UNUSED, int type EINA_UNUSED, E_Event_
static Eina_Bool 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_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;
const Eina_List *l, *ll;
E_Client *ec; E_Client *ec;
EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(e_comp->clients, l, ec)
EINA_LIST_FOREACH(c->clients, ll, ec) {
{ if (e_object_is_del(E_OBJECT(ec))) continue;
if (e_object_is_del(E_OBJECT(ec))) continue; ec->e.fetch.profile = 1;
ec->e.fetch.profile = 1; EC_CHANGED(ec);
EC_CHANGED(ec); }
}
return ECORE_CALLBACK_RENEW; return ECORE_CALLBACK_RENEW;
} }
@ -2268,84 +2260,80 @@ EINTERN void
e_client_idler_before(void) e_client_idler_before(void)
{ {
const Eina_List *l; const Eina_List *l;
E_Comp *c; E_Client *ec;
if (!eina_hash_population(clients_hash)) return; if (!eina_hash_population(clients_hash)) return;
EINA_LIST_FOREACH(e_comp_list(), l, c)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{ {
Eina_List *ll; Eina_Stringshare *title;
E_Client *ec; // pass 1 - eval0. fetch properties on new or on change and
// call hooks to decide what to do - maybe move/resize
if (!ec->changed) continue;
EINA_LIST_FOREACH(c->clients, ll, ec) if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_FETCH, ec)) continue;
/* FETCH is hooked by the compositor to get client hints */
title = e_client_util_name_get(ec);
if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_FETCH, ec)) continue;
if (title != e_client_util_name_get(ec))
_e_client_event_property(ec, E_CLIENT_PROPERTY_TITLE);
/* PRE_POST_FETCH calls e_remember apply for new client */
if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_POST_FETCH, ec)) continue;
if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_POST_FETCH, ec)) continue;
if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_FRAME_ASSIGN, ec)) continue;
if ((ec->border.changed) && (!ec->shaded) && ((!ec->override) || ec->internal) &&
(!(((ec->maximized & E_MAXIMIZE_TYPE) == E_MAXIMIZE_FULLSCREEN))))
_e_client_frame_update(ec);
ec->border.changed = 0;
_e_client_hook_call(E_CLIENT_HOOK_EVAL_POST_FRAME_ASSIGN, ec);
}
E_CLIENT_FOREACH(e_comp, ec)
{
// pass 2 - show windows needing show
if ((ec->changes.visible) && (ec->visible) &&
(!ec->new_client) && (!ec->changes.pos) &&
(!ec->changes.size))
{ {
Eina_Stringshare *title; evas_object_show(ec->frame);
// pass 1 - eval0. fetch properties on new or on change and ec->changes.visible = !evas_object_visible_get(ec->frame);
// call hooks to decide what to do - maybe move/resize
if (!ec->changed) continue;
if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_FETCH, ec)) continue;
/* FETCH is hooked by the compositor to get client hints */
title = e_client_util_name_get(ec);
if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_FETCH, ec)) continue;
if (title != e_client_util_name_get(ec))
_e_client_event_property(ec, E_CLIENT_PROPERTY_TITLE);
/* PRE_POST_FETCH calls e_remember apply for new client */
if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_POST_FETCH, ec)) continue;
if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_POST_FETCH, ec)) continue;
if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_FRAME_ASSIGN, ec)) continue;
if ((ec->border.changed) && (!ec->shaded) && ((!ec->override) || ec->internal) &&
(!(((ec->maximized & E_MAXIMIZE_TYPE) == E_MAXIMIZE_FULLSCREEN))))
_e_client_frame_update(ec);
ec->border.changed = 0;
_e_client_hook_call(E_CLIENT_HOOK_EVAL_POST_FRAME_ASSIGN, ec);
} }
E_CLIENT_FOREACH(c, ec) if ((!ec->new_client) && (!e_client_util_ignored_get(ec)) &&
(!E_INSIDE(ec->x, ec->y, 0, 0, ec->comp->man->w - 5, ec->comp->man->h - 5)) &&
(!E_INSIDE(ec->x, ec->y, 0 - ec->w + 5, 0 - ec->h + 5, ec->comp->man->w - 5, ec->comp->man->h - 5))
)
{ {
// pass 2 - show windows needing show if (e_config->screen_limits != E_SCREEN_LIMITS_COMPLETELY)
if ((ec->changes.visible) && (ec->visible) && _e_client_move_lost_window_to_center(ec);
(!ec->new_client) && (!ec->changes.pos) && }
(!ec->changes.size)) }
{
evas_object_show(ec->frame);
ec->changes.visible = !evas_object_visible_get(ec->frame);
}
if ((!ec->new_client) && (!e_client_util_ignored_get(ec)) && if (_e_client_layout_cb)
(!E_INSIDE(ec->x, ec->y, 0, 0, ec->comp->man->w - 5, ec->comp->man->h - 5)) && _e_client_layout_cb(e_comp);
(!E_INSIDE(ec->x, ec->y, 0 - ec->w + 5, 0 - ec->h + 5, ec->comp->man->w - 5, ec->comp->man->h - 5))
) // pass 3 - hide windows needing hide and eval (main eval)
{ E_CLIENT_FOREACH(e_comp, ec)
if (e_config->screen_limits != E_SCREEN_LIMITS_COMPLETELY) {
_e_client_move_lost_window_to_center(ec); if (e_object_is_del(E_OBJECT(ec))) continue;
}
if ((ec->changes.visible) && (!ec->visible))
{
evas_object_hide(ec->frame);
ec->changes.visible = 0;
} }
if (_e_client_layout_cb) if (ec->changed)
_e_client_layout_cb(c); _e_client_eval(ec);
// pass 3 - hide windows needing hide and eval (main eval) if ((ec->changes.visible) && (ec->visible) && (!ec->changed))
E_CLIENT_FOREACH(c, ec)
{ {
if (e_object_is_del(E_OBJECT(ec))) continue; evas_object_show(ec->frame);
ec->changes.visible = !evas_object_visible_get(ec->frame);
if ((ec->changes.visible) && (!ec->visible)) ec->changed = ec->changes.visible;
{
evas_object_hide(ec->frame);
ec->changes.visible = 0;
}
if (ec->changed)
_e_client_eval(ec);
if ((ec->changes.visible) && (ec->visible) && (!ec->changed))
{
evas_object_show(ec->frame);
ec->changes.visible = !evas_object_visible_get(ec->frame);
ec->changed = ec->changes.visible;
}
} }
} }
} }
@ -2682,28 +2670,16 @@ e_client_warping_get(void)
EAPI Eina_List * 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; Eina_List *list = NULL;
E_Client *ec; E_Client *ec;
if (c) EINA_LIST_FOREACH(e_comp->clients, l, ec)
{ {
EINA_LIST_FOREACH(c->clients, ll, ec) if (ec->lock_life)
{ list = eina_list_append(list, 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; return list;
} }
@ -3530,28 +3506,23 @@ EAPI Eina_List *
e_client_lost_windows_get(E_Zone *zone) e_client_lost_windows_get(E_Zone *zone)
{ {
Eina_List *list = NULL; Eina_List *list = NULL;
const Eina_List *l, *ll; const Eina_List *l;
E_Client *ec; E_Client *ec;
E_Comp *c;
int loss_overlap = 5; int loss_overlap = 5;
E_OBJECT_CHECK_RETURN(zone, NULL); E_OBJECT_CHECK_RETURN(zone, NULL);
E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, NULL); E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, NULL);
EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(e_comp->clients, l, ec)
{ {
if (zone->comp != c) continue; if (ec->zone != zone) continue;
EINA_LIST_FOREACH(c->clients, ll, ec)
{
if (ec->zone != zone) continue;
if (!E_INTERSECTS(ec->zone->x + loss_overlap, if (!E_INTERSECTS(ec->zone->x + loss_overlap,
ec->zone->y + loss_overlap, ec->zone->y + loss_overlap,
ec->zone->w - (2 * loss_overlap), ec->zone->w - (2 * loss_overlap),
ec->zone->h - (2 * loss_overlap), ec->zone->h - (2 * loss_overlap),
ec->x, ec->y, ec->w, ec->h)) ec->x, ec->y, ec->w, ec->h))
{ {
list = eina_list_append(list, ec); list = eina_list_append(list, ec);
}
} }
} }
return list; 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 Eina_Bool e_client_comp_grabbed_get(void);
EAPI E_Client *e_client_action_get(void); EAPI E_Client *e_client_action_get(void);
EAPI E_Client *e_client_warping_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_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_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); 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 *handlers = NULL;
static Eina_List *hooks = NULL; static Eina_List *hooks = NULL;
static Eina_List *compositors = NULL; EAPI E_Comp *e_comp = NULL;
static Eina_Hash *ignores = NULL; static Eina_Hash *ignores = NULL;
static Eina_List *actions = 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 #ifdef SHAPE_DEBUG
static void static void
_e_comp_shape_debug_rect(E_Comp *c, Eina_Rectangle *rect, E_Color *color) _e_comp_shape_debug_rect(E_Comp *c, Eina_Rectangle *rect, E_Color *color)
@ -855,25 +848,20 @@ _e_comp_override_expire(void *data)
static Eina_Bool static Eina_Bool
_e_comp_screensaver_on(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED) _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_Zone *zone;
E_Comp *c;
ecore_frametime = ecore_animator_frametime_get(); ecore_frametime = ecore_animator_frametime_get();
// fixme: use hash if compositors list > 4 if (e_comp->saver) return ECORE_CALLBACK_RENEW;
EINA_LIST_FOREACH(compositors, l, c) 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)
{ {
if (c->saver) continue; e_zone_fade_handle(zone, 1, 3.0);
e_comp_override_add(c); edje_object_signal_emit(zone->base, "e,state,screensaver,on", "e");
c->saver = EINA_TRUE; edje_object_signal_emit(zone->over, "e,state,screensaver,on", "e");
if (c->render_animator)
ecore_animator_freeze(c->render_animator);
EINA_LIST_FOREACH(c->zones, ll, 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; 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 static Eina_Bool
_e_comp_screensaver_off(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED) _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_Zone *zone;
E_Comp *c; E_Client *ec;
ecore_animator_frametime_set(ecore_frametime); ecore_animator_frametime_set(ecore_frametime);
// fixme: use hash if compositors list > 4 if (!e_comp->saver) return ECORE_CALLBACK_RENEW;
EINA_LIST_FOREACH(compositors, l, c) 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)
{ {
E_Client *ec; edje_object_signal_emit(zone->base, "e,state,screensaver,off", "e");
if (!c->saver) continue; edje_object_signal_emit(zone->over, "e,state,screensaver,off", "e");
e_comp_override_del(c); e_zone_fade_handle(zone, 0, 0.5);
c->saver = EINA_FALSE;
if (!c->nocomp)
ecore_evas_manual_render_set(c->ee, EINA_FALSE);
EINA_LIST_FOREACH(c->zones, ll, 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)
if (e_comp_object_damage_exists(ec->frame))
e_comp_object_render_update_add(ec->frame);
} }
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; return ECORE_CALLBACK_PASS_ON;
} }
@ -1076,7 +1059,7 @@ e_comp_init(void)
#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) #if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
e_comp_wl_init(); e_comp_wl_init();
#endif #endif
if (!compositors) return EINA_FALSE; if (!e_comp) return EINA_FALSE;
out: out:
e_util_env_set("HYBRIS_EGLPLATFORM", NULL); e_util_env_set("HYBRIS_EGLPLATFORM", NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_SCREENSAVER_ON, _e_comp_screensaver_on, 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_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, 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; return EINA_TRUE;
} }
@ -1278,17 +1257,16 @@ EAPI E_Comp *
e_comp_new(void) e_comp_new(void)
{ {
E_Comp *c; 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); c = E_OBJECT_ALLOC(E_Comp, E_COMP_TYPE, _e_comp_free);
if (!c) return NULL; if (!c) return NULL;
c->num = eina_list_count(compositors); c->name = eina_stringshare_add(_("Compositor"));
snprintf(name, sizeof(name), _("Compositor %u"), c->num);
c->name = eina_stringshare_add(name);
c->render_animator = ecore_animator_add(_e_comp_cb_animator, c); c->render_animator = ecore_animator_add(_e_comp_cb_animator, c);
ecore_animator_freeze(c->render_animator); ecore_animator_freeze(c->render_animator);
compositors = eina_list_append(compositors, c); e_comp = c;
return c; return c;
} }
@ -1301,15 +1279,10 @@ e_comp_internal_save(void)
EINTERN int EINTERN int
e_comp_shutdown(void) e_comp_shutdown(void)
{ {
E_Comp *c;
E_FREE_FUNC(action_timeout, ecore_timer_del); E_FREE_FUNC(action_timeout, ecore_timer_del);
EINA_LIST_FREE(compositors, c) while (e_comp->clients)
{ e_object_del(eina_list_data_get(e_comp->clients));
while (c->clients) e_object_del(E_OBJECT(e_comp));
e_object_del(eina_list_data_get(c->clients));
e_object_del(E_OBJECT(c));
}
E_FREE_LIST(handlers, ecore_event_handler_del); E_FREE_LIST(handlers, ecore_event_handler_del);
E_FREE_LIST(actions, e_object_del); E_FREE_LIST(actions, e_object_del);
E_FREE_LIST(hooks, e_client_hook_del); E_FREE_LIST(hooks, e_client_hook_del);
@ -1381,114 +1354,21 @@ e_comp_config_get(void)
return conf; return conf;
} }
EAPI const Eina_List *
e_comp_list(void)
{
return compositors;
}
EAPI void EAPI void
e_comp_shadows_reset(void) e_comp_shadows_reset(void)
{ {
Eina_List *l; E_Client *ec;
E_Comp *c;
EINA_LIST_FOREACH(compositors, l, c) _e_comp_fps_update(e_comp);
{ E_LIST_FOREACH(e_comp->zones, e_comp_canvas_zone_update);
E_Client *ec; E_CLIENT_FOREACH(e_comp, ec)
e_comp_object_frame_theme_set(ec->frame, E_COMP_OBJECT_FRAME_RESHADOW);
_e_comp_fps_update(c);
E_LIST_FOREACH(c->zones, e_comp_canvas_zone_update);
E_CLIENT_FOREACH(c, ec)
e_comp_object_frame_theme_set(ec->frame, E_COMP_OBJECT_FRAME_RESHADOW);
}
} }
EAPI E_Comp * EAPI E_Comp *
e_comp_get(const void *o) e_comp_get(const void *o EINA_UNUSED)
{ {
E_Client *ec; return e_comp;
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;
} }
@ -1585,51 +1465,33 @@ FIXME
EAPI void EAPI void
e_comp_block_window_add(void) e_comp_block_window_add(void)
{ {
E_Comp *c; e_comp->block_count++;
Eina_List *l; 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);
EINA_LIST_FOREACH(compositors, l, c) INF("BLOCK WIN: %x", e_comp->block_win);
{ ecore_x_window_background_color_set(e_comp->block_win, 0, 0, 0);
c->block_count++; e_comp_ignore_win_add(e_comp->block_win);
if (c->block_win) continue; ecore_x_window_configure(e_comp->block_win,
c->block_win = ecore_x_window_new(c->man->root, c->man->x, c->man->y, c->man->w, c->man->h); ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING | ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
INF("BLOCK WIN: %x", c->block_win); 0, 0, 0, 0, 0, ((E_Comp_Win*)e_comp->wins)->win, ECORE_X_WINDOW_STACK_ABOVE);
ecore_x_window_background_color_set(c->block_win, 0, 0, 0); ecore_x_window_show(e_comp->block_win);
e_comp_ignore_win_add(c->block_win);
ecore_x_window_configure(c->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);
}
} }
EAPI void EAPI void
e_comp_block_window_del(void) e_comp_block_window_del(void)
{ {
E_Comp *c; if (!e_comp->block_count) return;
Eina_List *l; e_comp->block_count--;
if (e_comp->block_count) return;
EINA_LIST_FOREACH(compositors, l, c) if (e_comp->block_win) ecore_x_window_free(e_comp->block_win);
{ e_comp->block_win = 0;
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;
}
} }
#endif #endif
EAPI E_Comp * EAPI E_Comp *
e_comp_find_by_window(Ecore_Window win) e_comp_find_by_window(Ecore_Window win)
{ {
Eina_List *l; if ((e_comp->win == win) || (e_comp->ee_win == win) || (e_comp->man->root == win)) return e_comp;
E_Comp *c;
EINA_LIST_FOREACH(compositors, l, c)
{
if ((c->win == win) || (c->ee_win == win) || (c->man->root == win)) return c;
}
return NULL; return NULL;
} }
@ -1740,34 +1602,22 @@ e_comp_gl_get(void)
EAPI E_Comp * EAPI E_Comp *
e_comp_evas_find(const Evas *e) e_comp_evas_find(const Evas *e)
{ {
Eina_List *l; if (e_comp->evas == e) return e_comp;
E_Comp *c;
EINA_LIST_FOREACH(compositors, l, c)
if (c->evas == e) return c;
return NULL; return NULL;
} }
EAPI void EAPI void
e_comp_button_bindings_ungrab_all(void) e_comp_button_bindings_ungrab_all(void)
{ {
Eina_List *l; if (e_comp->bindings_ungrab_cb)
E_Comp *c; e_comp->bindings_ungrab_cb(e_comp);
EINA_LIST_FOREACH(compositors, l, c)
if (c->bindings_ungrab_cb)
c->bindings_ungrab_cb(c);
} }
EAPI void EAPI void
e_comp_button_bindings_grab_all(void) e_comp_button_bindings_grab_all(void)
{ {
Eina_List *l; if (e_comp->bindings_grab_cb)
E_Comp *c; e_comp->bindings_grab_cb(e_comp);
EINA_LIST_FOREACH(compositors, l, c)
if (c->bindings_grab_cb)
c->bindings_grab_cb(c);
} }
EAPI void 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 E_Comp_Config *e_comp_config_get(void);
EAPI const Eina_List *e_comp_list(void); EAPI const Eina_List *e_comp_list(void);
EAPI void e_comp_shadows_reset(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 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_util_wins_print(const E_Comp *c);
EAPI void e_comp_ignore_win_add(E_Pixmap_Type type, Ecore_Window win); 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(Evas_Object *parent, const char *params);
EAPI E_Config_Dialog *e_int_config_comp_match(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) 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"); 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
#endif #endif

View File

@ -1,5 +1,13 @@
#include "e.h" #include "e.h"
static Eina_List *handlers;
static void
_e_comp_canvas_cb_del()
{
E_FREE_LIST(handlers, ecore_event_handler_del);
}
static void static void
_e_comp_canvas_event_compositor_resize_free(void *data EINA_UNUSED, void *event) _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 static void
_e_comp_canvas_screensaver_active(void *d EINA_UNUSED, Evas_Object *obj, const char *sig EINA_UNUSED, const char *src EINA_UNUSED) _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_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_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_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); evas_object_show(o);
ecore_evas_name_class_set(c->ee, "E", "Comp_EE"); ecore_evas_name_class_set(c->ee, "E", "Comp_EE");
@ -155,6 +173,9 @@ e_comp_canvas_init(E_Comp *c)
} }
else else
e_zone_new(c, 0, 0, 0, 0, c->man->w, c->man->h); 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; return EINA_TRUE;
} }
@ -236,17 +257,6 @@ e_comp_zone_id_get(E_Comp *c, int id)
return NULL; 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 * EAPI E_Desk *
e_comp_desk_window_profile_get(E_Comp *c, const char *profile) 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 EAPI void
e_comp_canvas_update(E_Comp *c) e_comp_canvas_update(void)
{ {
E_Event_Compositor_Resize *ev; E_Event_Compositor_Resize *ev;
Eina_List *l, *screens, *zones = NULL, *ll; Eina_List *l, *screens, *zones = NULL, *ll;
@ -343,8 +353,8 @@ e_comp_canvas_update(E_Comp *c)
if (screens) if (screens)
{ {
zones = c->zones; zones = e_comp->zones;
c->zones = NULL; e_comp->zones = NULL;
EINA_LIST_FOREACH(screens, l, scr) EINA_LIST_FOREACH(screens, l, scr)
{ {
zone = NULL; zone = NULL;
@ -360,12 +370,12 @@ e_comp_canvas_update(E_Comp *c)
if (changed) if (changed)
printf("@@@ FOUND ZONE %i %i [%p]\n", zone->num, zone->id, zone); printf("@@@ FOUND ZONE %i %i [%p]\n", zone->num, zone->id, zone);
zones = eina_list_remove(zones, 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; zone->num = scr->screen;
} }
else 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); scr->x, scr->y, scr->w, scr->h);
printf("@@@ NEW ZONE = %p\n", zone); printf("@@@ NEW ZONE = %p\n", zone);
changed = EINA_TRUE; changed = EINA_TRUE;
@ -374,19 +384,19 @@ e_comp_canvas_update(E_Comp *c)
printf("@@@ SCREENS: %i %i | %i %i %ix%i\n", printf("@@@ SCREENS: %i %i | %i %i %ix%i\n",
scr->screen, scr->escreen, scr->x, scr->y, scr->w, scr->h); 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) if (zones)
{ {
E_Zone *spare_zone; E_Zone *spare_zone;
changed = EINA_TRUE; 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) EINA_LIST_FREE(zones, zone)
{ {
E_Client *ec; E_Client *ec;
E_CLIENT_FOREACH(c, ec) E_CLIENT_FOREACH(e_comp, ec)
{ {
if (ec->zone == zone) if (ec->zone == zone)
{ {
@ -407,10 +417,10 @@ e_comp_canvas_update(E_Comp *c)
{ {
E_Zone *z; E_Zone *z;
z = e_comp_zone_number_get(c, 0); z = e_comp_zone_number_get(e_comp, 0);
if (z) 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); if (changed) e_shelf_zone_move_resize_handle(z);
} }
} }
@ -419,12 +429,12 @@ e_comp_canvas_update(E_Comp *c)
if (!starting) if (!starting)
{ {
ev = calloc(1, sizeof(E_Event_Compositor_Resize)); ev = calloc(1, sizeof(E_Event_Compositor_Resize));
ev->comp = c; ev->comp = e_comp;
e_object_ref(E_OBJECT(c)); e_object_ref(E_OBJECT(e_comp));
ecore_event_add(E_EVENT_COMPOSITOR_RESIZE, ev, _e_comp_canvas_event_compositor_resize_free, NULL); 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->base, evas_object_del);
E_FREE_FUNC(zone->over, 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; Eina_List *tmp = NULL;
E_Client *ec; 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 /* Make temporary list as e_client_res_change_geometry_restore
* rearranges the order. */ * 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)) if (!e_client_util_ignored_get(ec))
tmp = eina_list_append(tmp, ec); tmp = eina_list_append(tmp, ec);
@ -485,7 +495,7 @@ e_comp_canvas_fps_toggle(void)
conf->fps_show = !conf->fps_show; conf->fps_show = !conf->fps_show;
e_comp_internal_save(); e_comp_internal_save();
E_LIST_FOREACH(e_comp_list(), e_comp_render_queue); e_comp_render_queue(e_comp);
} }
EAPI E_Layer 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_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_number_get(E_Comp *c, int num);
EAPI E_Zone * e_comp_zone_id_get(E_Comp *c, int id); 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 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_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_fake_layers_init(E_Comp *comp);
EAPI void e_comp_canvas_fps_toggle(void); EAPI void e_comp_canvas_fps_toggle(void);
EAPI E_Layer e_comp_canvas_layer_map_to(unsigned int layer); 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_comp_x_post_client_idler_cb(void *d EINA_UNUSED)
{ {
E_Client *ec; E_Client *ec;
const Eina_List *l;
E_Comp *c;
//INF("POST IDLER"); //INF("POST IDLER");
EINA_LIST_FREE(post_clients, ec) 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) if (ec->post_move)
{ {
E_Client *tmp; E_Client *tmp;
Eina_List *l;
EINA_LIST_FOREACH(ec->e.state.video_child, l, tmp) EINA_LIST_FOREACH(ec->e.state.video_child, l, tmp)
{ {
@ -584,12 +583,11 @@ _e_comp_x_post_client_idler_cb(void *d EINA_UNUSED)
ec->post_move = 0; ec->post_move = 0;
ec->post_resize = 0; ec->post_resize = 0;
} }
EINA_LIST_FOREACH(e_comp_list(), l, c) if (e_comp->x_comp_data->restack && (!e_comp->new_clients))
if (c->x_comp_data->restack && (!c->new_clients)) {
{ e_hints_client_stacking_set();
e_hints_client_stacking_set(); e_comp->x_comp_data->restack = 0;
c->x_comp_data->restack = 0; }
}
_e_comp_x_post_client_idler = NULL; _e_comp_x_post_client_idler = NULL;
return EINA_FALSE; 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); ec = _e_comp_x_client_find_by_window(ev->win);
if (!ec) if (!ec)
{ {
const Eina_List *l; if (!e_comp->x_comp_data->retry_clients) return ECORE_CALLBACK_RENEW;
E_Comp *c; 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)
EINA_LIST_FOREACH(e_comp_list(), l, c) E_FREE_FUNC(e_comp->x_comp_data->retry_timer, ecore_timer_del);
{
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);
}
return ECORE_CALLBACK_PASS_ON; return ECORE_CALLBACK_PASS_ON;
} }
if (ec->comp_data) 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); ec = _e_comp_x_client_find_by_window(ev->win);
if (!ec) if (!ec)
{ {
const Eina_List *l; if (!e_comp->x_comp_data->retry_clients) return ECORE_CALLBACK_RENEW;
E_Comp *c; 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)
EINA_LIST_FOREACH(e_comp_list(), l, c) E_FREE_FUNC(e_comp->x_comp_data->retry_timer, ecore_timer_del);
{
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);
}
return ECORE_CALLBACK_PASS_ON; return ECORE_CALLBACK_PASS_ON;
} }
if ((!ec->visible) || (ec->hidden && ec->unredirected_single)) if ((!ec->visible) || (ec->hidden && ec->unredirected_single))
@ -2017,27 +2003,25 @@ _e_comp_x_state_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Ev
static Eina_Bool static Eina_Bool
_e_comp_x_mapping_change(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Mapping_Change *ev EINA_UNUSED) _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_Client *ec;
E_Comp *c;
if (_e_comp_x_mapping_change_disabled) return ECORE_CALLBACK_RENEW; if (_e_comp_x_mapping_change_disabled) return ECORE_CALLBACK_RENEW;
e_managers_keys_ungrab(); e_managers_keys_ungrab();
EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(e_comp->clients, l, ec)
EINA_LIST_FOREACH(c->clients, ll, ec) {
{ Ecore_X_Window win;
Ecore_X_Window win;
if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_X) continue; if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_X) continue;
win = e_client_util_pwin_get(ec); win = e_client_util_pwin_get(ec);
if ((!ec->comp_data->first_map) || (!ec->comp_data->reparented)) continue; if ((!ec->comp_data->first_map) || (!ec->comp_data->reparented)) continue;
_e_comp_x_focus_setdown(ec); _e_comp_x_focus_setdown(ec);
e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, win); e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, win);
e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, win); e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, win);
e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, win); e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, win);
e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, win); e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, win);
_e_comp_x_focus_setup(ec); _e_comp_x_focus_setup(ec);
} }
e_managers_keys_grab(); e_managers_keys_grab();
return ECORE_CALLBACK_PASS_ON; return ECORE_CALLBACK_PASS_ON;
} }
@ -4625,16 +4609,15 @@ _e_comp_x_xinerama_setup(int rw, int rh)
} }
static void static void
_e_comp_x_ee_resize(Ecore_Evas *ee) _e_comp_x_ee_resize(Ecore_Evas *ee EINA_UNUSED)
{ {
E_Client *ec; 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); ecore_x_netwm_desk_size_set(e_comp->man->root, e_comp->man->w, e_comp->man->h);
_e_comp_x_xinerama_setup(c->man->w, c->man->h); _e_comp_x_xinerama_setup(e_comp->man->w, e_comp->man->h);
e_comp_canvas_update(c); e_comp_canvas_update();
E_CLIENT_FOREACH(c, ec) E_CLIENT_FOREACH(e_comp, ec)
{ {
if (!e_client_util_ignored_get(ec)) if (!e_client_util_ignored_get(ec))
_e_comp_x_client_zone_geometry_set(ec); _e_comp_x_client_zone_geometry_set(ec);
@ -4856,72 +4839,61 @@ _e_comp_x_desklock_key_down(E_Comp *comp, int t EINA_UNUSED, Ecore_Event_Key *ev
static void static void
_e_comp_x_desklock_hide(void) _e_comp_x_desklock_hide(void)
{ {
E_Comp *comp; if (e_comp->x_comp_data->lock_win)
const Eina_List *l;
EINA_LIST_FOREACH(e_comp_list(), l, comp)
{ {
if (comp->x_comp_data->lock_win) 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_grabinput_release(comp->x_comp_data->lock_win, comp->x_comp_data->lock_win); e_comp->x_comp_data->lock_win = 0;
ecore_x_window_free(comp->x_comp_data->lock_win);
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 static Eina_Bool
_e_comp_x_desklock_show(void) _e_comp_x_desklock_show(void)
{ {
E_Comp *comp; Ecore_X_Window win;
const Eina_List *l;
EINA_LIST_FOREACH(e_comp_list(), l, comp) 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 win; Ecore_X_Window *windows;
int wnum, i;
win = comp->x_comp_data->lock_win = windows = ecore_x_window_children_get(e_comp->man->root, &wnum);
ecore_x_window_input_new(comp->man->root, 0, 0, 1, 1); if (!windows) goto fail;
ecore_x_window_show(win); for (i = 0; i < wnum; i++)
if (!e_grabinput_get(win, 0, win))
{ {
Ecore_X_Window *windows; Ecore_X_Window_Attributes att;
int wnum, i;
windows = ecore_x_window_children_get(comp->man->root, &wnum); memset(&att, 0, sizeof(Ecore_X_Window_Attributes));
if (!windows) goto fail; ecore_x_window_attributes_get(windows[i], &att);
for (i = 0; i < wnum; i++) if (att.visible)
{ {
Ecore_X_Window_Attributes att; ecore_x_window_hide(windows[i]);
if (e_grabinput_get(win, 0, win))
memset(&att, 0, sizeof(Ecore_X_Window_Attributes));
ecore_x_window_attributes_get(windows[i], &att);
if (att.visible)
{ {
ecore_x_window_hide(windows[i]); e_comp->x_comp_data->lock_grab_break_wnd = windows[i];
if (e_grabinput_get(win, 0, win)) free(windows);
{ goto works;
comp->x_comp_data->lock_grab_break_wnd = windows[i];
free(windows);
goto works;
}
ecore_x_window_show(windows[i]);
} }
ecore_x_window_show(windows[i]);
} }
free(windows);
} }
works: free(windows);
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);
} }
works:
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; return EINA_TRUE;
fail: fail:
/* everything failed - can't lock */ /* everything failed - can't lock */

View File

@ -173,45 +173,41 @@ e_desk_name_del(int manager, int zone, int desk_x, int desk_y)
EAPI void EAPI void
e_desk_name_update(void) e_desk_name_update(void)
{ {
const Eina_List *z, *l, *ll; const Eina_List *z, *l;
E_Comp *c;
E_Zone *zone; E_Zone *zone;
E_Desk *desk; E_Desk *desk;
E_Config_Desktop_Name *cfname; E_Config_Desktop_Name *cfname;
int d_x, d_y, ok; int d_x, d_y, ok;
char name[40]; char name[40];
EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(e_comp->zones, z, zone)
{ {
EINA_LIST_FOREACH(c->zones, z, zone) for (d_x = 0; d_x < zone->desk_x_count; d_x++)
{ {
for (d_x = 0; d_x < zone->desk_x_count; d_x++) for (d_y = 0; d_y < zone->desk_y_count; d_y++)
{ {
for (d_y = 0; d_y < zone->desk_y_count; d_y++) desk = zone->desks[d_x + zone->desk_x_count * d_y];
ok = 0;
EINA_LIST_FOREACH(e_config->desktop_names, l, cfname)
{ {
desk = zone->desks[d_x + zone->desk_x_count * d_y]; if ((cfname->manager >= 0) &&
ok = 0; ((int)e_comp->num != cfname->manager)) continue;
if ((cfname->zone >= 0) &&
((int)zone->num != cfname->zone)) continue;
if ((cfname->desk_x != d_x) ||
(cfname->desk_y != d_y)) continue;
e_desk_name_set(desk, cfname->name);
ok = 1;
break;
}
EINA_LIST_FOREACH(e_config->desktop_names, ll, cfname) if (!ok)
{ {
if ((cfname->manager >= 0) && snprintf(name, sizeof(name),
((int)c->num != cfname->manager)) continue; _(e_config->desktop_default_name),
if ((cfname->zone >= 0) && d_x, d_y);
((int)zone->num != cfname->zone)) continue; e_desk_name_set(desk, name);
if ((cfname->desk_x != d_x) ||
(cfname->desk_y != d_y)) continue;
e_desk_name_set(desk, cfname->name);
ok = 1;
break;
}
if (!ok)
{
snprintf(name, sizeof(name),
_(e_config->desktop_default_name),
d_x, d_y);
e_desk_name_set(desk, name);
}
} }
} }
} }
@ -615,8 +611,7 @@ e_desk_window_profile_del(int manager,
EAPI void EAPI void
e_desk_window_profile_update(void) e_desk_window_profile_update(void)
{ {
const Eina_List *z, *l, *ll; const Eina_List *z, *l;
E_Comp *c;
E_Zone *zone; E_Zone *zone;
E_Desk *desk; E_Desk *desk;
E_Config_Desktop_Window_Profile *cfprof; E_Config_Desktop_Window_Profile *cfprof;
@ -627,35 +622,32 @@ e_desk_window_profile_update(void)
if (!(e_config->use_desktop_window_profile)) if (!(e_config->use_desktop_window_profile))
return; return;
EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(e_comp->zones, z, zone)
{ {
EINA_LIST_FOREACH(c->zones, z, zone) for (d_x = 0; d_x < zone->desk_x_count; d_x++)
{ {
for (d_x = 0; d_x < zone->desk_x_count; d_x++) for (d_y = 0; d_y < zone->desk_y_count; d_y++)
{ {
for (d_y = 0; d_y < zone->desk_y_count; d_y++) desk = zone->desks[d_x + zone->desk_x_count * d_y];
ok = 0;
EINA_LIST_FOREACH(e_config->desktop_window_profiles, l, cfprof)
{ {
desk = zone->desks[d_x + zone->desk_x_count * d_y]; if ((cfprof->manager >= 0) &&
ok = 0; ((int)e_comp->num != cfprof->manager)) continue;
if ((cfprof->zone >= 0) &&
((int)zone->num != cfprof->zone)) continue;
if ((cfprof->desk_x != d_x) ||
(cfprof->desk_y != d_y)) continue;
e_desk_window_profile_set(desk, cfprof->profile);
ok = 1;
break;
}
EINA_LIST_FOREACH(e_config->desktop_window_profiles, ll, cfprof) if (!ok)
{ {
if ((cfprof->manager >= 0) && e_desk_window_profile_set
((int)c->num != cfprof->manager)) continue; (desk, e_config->desktop_default_window_profile);
if ((cfprof->zone >= 0) &&
((int)zone->num != cfprof->zone)) continue;
if ((cfprof->desk_x != d_x) ||
(cfprof->desk_y != d_y)) continue;
e_desk_window_profile_set(desk, cfprof->profile);
ok = 1;
break;
}
if (!ok)
{
e_desk_window_profile_set
(desk, e_config->desktop_default_window_profile);
}
} }
} }
} }

View File

@ -209,7 +209,6 @@ EAPI int
e_desklock_show(Eina_Bool suspend) e_desklock_show(Eina_Bool suspend)
{ {
const Eina_List *l; const Eina_List *l;
E_Comp *comp;
E_Event_Desklock *ev; E_Event_Desklock *ev;
E_Desklock_Show_Cb show_cb; E_Desklock_Show_Cb show_cb;
E_Desklock_Hide_Cb hide_cb; E_Desklock_Hide_Cb hide_cb;
@ -263,17 +262,16 @@ e_desklock_show(Eina_Bool suspend)
if (!show_cb()) goto fail; if (!show_cb()) goto fail;
} }
EINA_LIST_FOREACH(e_comp_list(), l, comp) {
{ Evas_Object *o;
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); block_rects = eina_list_append(block_rects, o);
evas_object_color_set(o, 0, 0, 0, 255); 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_layer_set(o, E_LAYER_DESKLOCK);
evas_object_show(o); evas_object_show(o);
} }
if (e_config->desklock_language) if (e_config->desklock_language)
e_intl_language_set(e_config->desklock_language); e_intl_language_set(e_config->desklock_language);
@ -335,8 +333,8 @@ e_desklock_hide(void)
if ((!_e_desklock_state) && (!_e_custom_desklock_exe)) return; if ((!_e_desklock_state) && (!_e_custom_desklock_exe)) return;
E_LIST_FOREACH(e_comp_list(), e_comp_override_del); e_comp_override_del(e_comp);
E_LIST_FOREACH(e_comp_list(), e_comp_shape_queue); e_comp_shape_queue(e_comp);
E_FREE_LIST(block_rects, evas_object_del); E_FREE_LIST(block_rects, evas_object_del);
//e_comp_block_window_del(); //e_comp_block_window_del();
if (e_config->desklock_language) 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 EINTERN int
e_dnd_init(void) 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_text_uri_list = eina_stringshare_add("text/uri-list");
_type_xds = eina_stringshare_add("XdndDirectSave0"); _type_xds = eina_stringshare_add("XdndDirectSave0");
_type_text_x_moz_url = eina_stringshare_add("text/x-moz-url"); _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_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); 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(e_comp->ee_win, 1);
e_drop_xdnd_register_set(c->ee_win, 1);
_action = ECORE_X_ATOM_XDND_ACTION_PRIVATE; _action = ECORE_X_ATOM_XDND_ACTION_PRIVATE;
#endif #endif

View File

@ -160,22 +160,20 @@ e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec,
if (dosingle) if (dosingle)
{ {
const Eina_List *l, *ll; const Eina_List *l;
E_Client *ec; E_Client *ec;
E_Comp *c;
EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(e_comp->clients, l, ec)
EINA_LIST_FOREACH(c->clients, ll, ec) {
{ if (ec && (ec->desktop == desktop))
if (ec && (ec->desktop == desktop)) {
{ if (!ec->focused)
if (!ec->focused) e_client_activate(ec, EINA_TRUE);
e_client_activate(ec, EINA_TRUE); else
else evas_object_raise(ec->frame);
evas_object_raise(ec->frame); return NULL;
return NULL; }
} }
}
} }
} }
} }

View File

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

View File

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

View File

@ -333,63 +333,57 @@ e_hints_client_stacking_set(void)
{ {
#ifdef HAVE_WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
E_Comp *comp; unsigned int c, i = 0, non_x = 0;
const Eina_List *l; Ecore_X_Window *clients = NULL;
#define CLIENT_STACK_DEBUG #define CLIENT_STACK_DEBUG
/* Get client count */ /* Get client count */
EINA_LIST_FOREACH(e_comp_list(), l, comp) c = e_clients_count(e_comp);
if (c)
{ {
unsigned int c, i = 0, non_x = 0; E_Client *ec;
Ecore_X_Window *clients = NULL; #ifdef CLIENT_STACK_DEBUG
Eina_List *ll = NULL;
c = e_clients_count(comp); #endif
if (c) clients = calloc(c, sizeof(Ecore_X_Window));
E_CLIENT_FOREACH(e_comp, ec)
{ {
E_Client *ec; if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_X)
#ifdef CLIENT_STACK_DEBUG
Eina_List *ll = NULL;
#endif
clients = calloc(c, sizeof(Ecore_X_Window));
E_CLIENT_FOREACH(comp, ec)
{ {
if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_X) non_x++;
{ continue;
non_x++;
continue;
}
clients[i++] = e_client_util_win_get(ec);
#ifdef CLIENT_STACK_DEBUG
ll = eina_list_append(ll, ec);
#endif
if (i > c)
{
CRI("Window list size greater than window count.");
break;
}
} }
clients[i++] = e_client_util_win_get(ec);
if (i < c - non_x)
{
#ifdef CLIENT_STACK_DEBUG #ifdef CLIENT_STACK_DEBUG
Eina_List *lll = eina_list_clone(comp->clients); ll = eina_list_append(ll, ec);
EINA_LIST_FREE(ll, ec)
lll = eina_list_remove(lll, ec);
EINA_LIST_FREE(lll, ec)
WRN("Missing %p: %snew client", ec, ec->new_client ? "" : "not ");
#endif #endif
CRI("Window list size less than window count."); if (i > c)
{
CRI("Window list size greater than window count.");
break;
} }
} }
/* XXX: it should be "more correct" to be setting the stacking atom as "windows per root"
* since any apps using it are probably not going to want windows from other screens if (i < c - non_x)
* to be returned in the list {
*/ #ifdef CLIENT_STACK_DEBUG
if (i <= c) Eina_List *lll = eina_list_clone(e_comp->clients);
ecore_x_netwm_client_list_stacking_set(comp->man->root, clients, c);
free(clients); EINA_LIST_FREE(ll, ec)
lll = eina_list_remove(lll, ec);
EINA_LIST_FREE(lll, ec)
WRN("Missing %p: %snew client", ec, ec->new_client ? "" : "not ");
#endif
CRI("Window list size less than window count.");
}
} }
/* XXX: it should be "more correct" to be setting the stacking atom as "windows per root"
* since any apps using it are probably not going to want windows from other screens
* to be returned in the list
*/
if (i <= c)
ecore_x_netwm_client_list_stacking_set(e_comp->man->root, clients, c);
free(clients);
#endif #endif
} }
@ -1630,13 +1624,10 @@ e_hints_scale_update(void)
{ {
#ifdef HAVE_WAYLAND_ONLY #ifdef HAVE_WAYLAND_ONLY
#else #else
E_Comp *c;
const Eina_List *l;
unsigned int scale = e_scale * 1000; unsigned int scale = e_scale * 1000;
EINA_LIST_FOREACH(e_comp_list(), l, c) if (e_comp->man->root)
if (c->man->root) ecore_x_window_prop_card32_set(e_comp->man->root, ATM_ENLIGHTENMENT_SCALE, &scale, 1);
ecore_x_window_prop_card32_set(c->man->root, ATM_ENLIGHTENMENT_SCALE, &scale, 1);
#endif #endif
} }

View File

@ -45,28 +45,13 @@ EAPI void
e_init_show(void) e_init_show(void)
{ {
Evas_Object *o; Evas_Object *o;
E_Comp *c;
E_Zone *zone; E_Zone *zone;
Eina_List *l; Eina_List *l;
/* exec init */ /* exec init */
/* extra screens */ EINA_LIST_FOREACH(e_comp->zones, l, zone)
EINA_LIST_FOREACH(e_comp_list()->next, l, c)
{ {
o = edje_object_add(c->evas); o = edje_object_add(e_comp->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);
if (!zone->num) if (!zone->num)
{ {
e_theme_edje_object_set(o, NULL, "e/init/splash"); e_theme_edje_object_set(o, NULL, "e/init/splash");
@ -99,7 +84,7 @@ EAPI void
e_init_hide(void) e_init_hide(void)
{ {
E_FREE_LIST(splash_objs, evas_object_del); 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_init_object = NULL;
E_FREE_FUNC(_e_init_timeout_timer, ecore_timer_del); E_FREE_FUNC(_e_init_timeout_timer, ecore_timer_del);
} }

View File

@ -358,54 +358,52 @@ _warning_dialog_show(void)
static int static int
_check_matches(E_Remember *rem, int update) _check_matches(E_Remember *rem, int update)
{ {
const Eina_List *l, *ll; const Eina_List *l;
E_Client *ec; E_Client *ec;
E_Comp *c;
const char *title; const char *title;
int n = 0; int n = 0;
EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(e_comp->clients, l, ec)
EINA_LIST_FOREACH(c->clients, ll, ec) {
{ int match = rem->match;
int match = rem->match; title = e_client_util_name_get(ec);
title = e_client_util_name_get(ec);
if ((match & E_REMEMBER_MATCH_NAME) && if ((match & E_REMEMBER_MATCH_NAME) &&
(e_util_glob_match(ec->icccm.name, rem->name))) (e_util_glob_match(ec->icccm.name, rem->name)))
match &= ~E_REMEMBER_MATCH_NAME; match &= ~E_REMEMBER_MATCH_NAME;
if ((match & E_REMEMBER_MATCH_CLASS) && if ((match & E_REMEMBER_MATCH_CLASS) &&
(e_util_glob_match(ec->icccm.class, rem->class))) (e_util_glob_match(ec->icccm.class, rem->class)))
match &= ~E_REMEMBER_MATCH_CLASS; match &= ~E_REMEMBER_MATCH_CLASS;
if ((match & E_REMEMBER_MATCH_TITLE) && if ((match & E_REMEMBER_MATCH_TITLE) &&
(e_util_glob_match(title, rem->title))) (e_util_glob_match(title, rem->title)))
match &= ~E_REMEMBER_MATCH_TITLE; match &= ~E_REMEMBER_MATCH_TITLE;
if ((match & E_REMEMBER_MATCH_ROLE) && if ((match & E_REMEMBER_MATCH_ROLE) &&
((!e_util_strcmp(rem->role, ec->icccm.window_role)) || ((!e_util_strcmp(rem->role, ec->icccm.window_role)) ||
(e_util_both_str_empty(rem->role, ec->icccm.window_role)))) (e_util_both_str_empty(rem->role, ec->icccm.window_role))))
match &= ~E_REMEMBER_MATCH_ROLE; match &= ~E_REMEMBER_MATCH_ROLE;
if ((match & E_REMEMBER_MATCH_TYPE) && if ((match & E_REMEMBER_MATCH_TYPE) &&
(rem->type == (int)ec->netwm.type)) (rem->type == (int)ec->netwm.type))
match &= ~E_REMEMBER_MATCH_TYPE; match &= ~E_REMEMBER_MATCH_TYPE;
if ((match & E_REMEMBER_MATCH_TRANSIENT) && if ((match & E_REMEMBER_MATCH_TRANSIENT) &&
((rem->transient && ec->icccm.transient_for != 0) || ((rem->transient && ec->icccm.transient_for != 0) ||
(!rem->transient && (ec->icccm.transient_for == 0)))) (!rem->transient && (ec->icccm.transient_for == 0))))
match &= ~E_REMEMBER_MATCH_TRANSIENT; match &= ~E_REMEMBER_MATCH_TRANSIENT;
if (match == 0) n++; if (match == 0) n++;
if (update) if (update)
{ {
ec->changed = 1; ec->changed = 1;
ec->changes.icon = 1; ec->changes.icon = 1;
} }
else if (n > 1) else if (n > 1)
break; break;
} }
return n; return n;
} }

View File

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

View File

@ -424,8 +424,7 @@ static Eldbus_Message *
_e_msgbus_window_list_cb(const Eldbus_Service_Interface *iface __UNUSED__, _e_msgbus_window_list_cb(const Eldbus_Service_Interface *iface __UNUSED__,
const Eldbus_Message *msg) const Eldbus_Message *msg)
{ {
const Eina_List *l, *ll; const Eina_List *l;
E_Comp *c;
E_Client *ec; E_Client *ec;
Eldbus_Message *reply; Eldbus_Message *reply;
Eldbus_Message_Iter *main_iter, *array; Eldbus_Message_Iter *main_iter, *array;
@ -439,19 +438,18 @@ _e_msgbus_window_list_cb(const Eldbus_Service_Interface *iface __UNUSED__,
eldbus_message_iter_arguments_append(main_iter, "a(si)", &array); eldbus_message_iter_arguments_append(main_iter, "a(si)", &array);
EINA_SAFETY_ON_FALSE_RETURN_VAL(array, reply); EINA_SAFETY_ON_FALSE_RETURN_VAL(array, reply);
EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(e_comp->clients, l, ec)
EINA_LIST_FOREACH(c->clients, ll, ec) {
{ Eldbus_Message_Iter *s;
Eldbus_Message_Iter *s;
if (e_client_util_ignored_get(ec)) continue; if (e_client_util_ignored_get(ec)) continue;
eldbus_message_iter_arguments_append(array, "(si)", &s); eldbus_message_iter_arguments_append(array, "(si)", &s);
if (!s) continue; if (!s) continue;
eldbus_message_iter_arguments_append(s, "si", ec->icccm.name, eldbus_message_iter_arguments_append(s, "si", ec->icccm.name,
e_client_util_win_get(ec)); e_client_util_win_get(ec));
eldbus_message_iter_container_close(array, s); eldbus_message_iter_container_close(array, s);
} }
eldbus_message_iter_container_close(main_iter, array); eldbus_message_iter_container_close(main_iter, array);
return reply; return reply;

View File

@ -89,10 +89,9 @@ e_remember_shutdown(void)
EAPI void EAPI void
e_remember_internal_save(void) e_remember_internal_save(void)
{ {
const Eina_List *l, *ll; const Eina_List *l;
E_Client *ec; E_Client *ec;
E_Remember *rem; E_Remember *rem;
E_Comp *c;
//printf("internal save %d\n", restart); //printf("internal save %d\n", restart);
if (!remembers) if (!remembers)
@ -104,28 +103,27 @@ e_remember_internal_save(void)
remember_idler_list = eina_list_free(remember_idler_list); remember_idler_list = eina_list_free(remember_idler_list);
} }
EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(e_comp->clients, l, ec)
EINA_LIST_FOREACH(c->clients, ll, ec) {
{ if ((!ec->internal) || e_client_util_ignored_get(ec)) continue;
if ((!ec->internal) || e_client_util_ignored_get(ec)) continue;
rem = E_NEW(E_Remember, 1); rem = E_NEW(E_Remember, 1);
if (!rem) break; if (!rem) break;
e_remember_default_match_set(rem, ec); e_remember_default_match_set(rem, ec);
rem->apply = (E_REMEMBER_APPLY_POS | E_REMEMBER_APPLY_SIZE | rem->apply = (E_REMEMBER_APPLY_POS | E_REMEMBER_APPLY_SIZE |
E_REMEMBER_APPLY_BORDER | E_REMEMBER_APPLY_LAYER | E_REMEMBER_APPLY_BORDER | E_REMEMBER_APPLY_LAYER |
E_REMEMBER_APPLY_SHADE | E_REMEMBER_APPLY_ZONE | E_REMEMBER_APPLY_SHADE | E_REMEMBER_APPLY_ZONE |
E_REMEMBER_APPLY_DESKTOP | E_REMEMBER_APPLY_LOCKS | E_REMEMBER_APPLY_DESKTOP | E_REMEMBER_APPLY_LOCKS |
E_REMEMBER_APPLY_SKIP_WINLIST | E_REMEMBER_APPLY_SKIP_WINLIST |
E_REMEMBER_APPLY_SKIP_PAGER | E_REMEMBER_APPLY_SKIP_PAGER |
E_REMEMBER_APPLY_SKIP_TASKBAR | E_REMEMBER_APPLY_SKIP_TASKBAR |
E_REMEMBER_APPLY_OFFER_RESISTANCE | E_REMEMBER_APPLY_OFFER_RESISTANCE |
E_REMEMBER_APPLY_OPACITY); E_REMEMBER_APPLY_OPACITY);
_e_remember_update(ec, rem); _e_remember_update(ec, rem);
remembers->list = eina_list_append(remembers->list, rem); remembers->list = eina_list_append(remembers->list, rem);
} }
e_config_domain_save("e_remember_restart", e_remember_list_edd, remembers); e_config_domain_save("e_remember_restart", e_remember_list_edd, remembers);
} }
@ -247,18 +245,16 @@ e_remember_unuse(E_Remember *rem)
EAPI void EAPI void
e_remember_del(E_Remember *rem) e_remember_del(E_Remember *rem)
{ {
const Eina_List *l, *ll; const Eina_List *l;
E_Client *ec; E_Client *ec;
E_Comp *c;
EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(e_comp->clients, l, ec)
EINA_LIST_FOREACH(c->clients, ll, ec) {
{ if (ec->remember != rem) continue;
if (ec->remember != rem) continue;
ec->remember = NULL; ec->remember = NULL;
e_remember_unuse(rem); e_remember_unuse(rem);
} }
_e_remember_free(rem); _e_remember_free(rem);
} }

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 static Eina_Bool
_e_sys_comp_action_timeout(void *data) _e_sys_comp_action_timeout(void *data)
{ {
const Eina_List *l, *ll; const Eina_List *l;
E_Comp *c;
E_Zone *zone; E_Zone *zone;
E_Sys_Action a = (long)(intptr_t)data; E_Sys_Action a = (long)(intptr_t)data;
const char *sig = NULL; const char *sig = NULL;
@ -99,9 +98,8 @@ _e_sys_comp_action_timeout(void *data)
E_FREE_FUNC(action_timeout, ecore_timer_del); E_FREE_FUNC(action_timeout, ecore_timer_del);
if (sig) if (sig)
{ {
EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(e_comp->zones, l, zone)
EINA_LIST_FOREACH(c->zones, ll, zone) edje_object_signal_callback_del(zone->over, sig, "e", _e_sys_comp_done_cb);
edje_object_signal_callback_del(zone->over, sig, "e", _e_sys_comp_done_cb);
} }
e_sys_action_raw_do(a, NULL); e_sys_action_raw_do(a, NULL);
return EINA_FALSE; return EINA_FALSE;
@ -110,24 +108,20 @@ _e_sys_comp_action_timeout(void *data)
static void static void
_e_sys_comp_emit_cb_wait(E_Sys_Action a, const char *sig, const char *rep, Eina_Bool nocomp_push) _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_Zone *zone;
E_Comp *c;
Eina_Bool first = EINA_TRUE; Eina_Bool first = EINA_TRUE;
EINA_LIST_FOREACH(e_comp_list(), l, c) 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)
{ {
if (nocomp_push) e_comp_override_add(c); e_zone_fade_handle(zone, nocomp_push, 0.5);
else e_comp_override_timed_pop(c); edje_object_signal_emit(zone->base, sig, "e");
EINA_LIST_FOREACH(c->zones, ll, zone) edje_object_signal_emit(zone->over, sig, "e");
{ if ((rep) && (first))
e_zone_fade_handle(zone, nocomp_push, 0.5); edje_object_signal_callback_add(zone->over, rep, "e", _e_sys_comp_done_cb, (void *)(long)a);
edje_object_signal_emit(zone->base, sig, "e"); first = EINA_FALSE;
edje_object_signal_emit(zone->over, sig, "e");
if ((rep) && (first))
edje_object_signal_callback_add(zone->over, rep, "e", _e_sys_comp_done_cb, (void *)(long)a);
first = EINA_FALSE;
}
} }
if (rep) if (rep)
{ {
@ -169,11 +163,7 @@ _e_sys_comp_logout(void)
static void static void
_e_sys_comp_resume(void) _e_sys_comp_resume(void)
{ {
const Eina_List *l; evas_damage_rectangle_add(e_comp->evas, 0, 0, e_comp->man->w, e_comp->man->h);
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);
_e_sys_comp_emit_cb_wait(E_SYS_SUSPEND, "e,state,sys,resume", NULL, EINA_FALSE); _e_sys_comp_emit_cb_wait(E_SYS_SUSPEND, "e,state,sys,resume", NULL, EINA_FALSE);
e_screensaver_deactivate(); e_screensaver_deactivate();
} }
@ -664,17 +654,14 @@ _e_sys_logout_confirm_dialog_update(int remaining)
static Eina_Bool static Eina_Bool
_e_sys_cb_logout_timer(void *data __UNUSED__) _e_sys_cb_logout_timer(void *data __UNUSED__)
{ {
const Eina_List *l;
E_Comp *c;
E_Client *ec; E_Client *ec;
int pending = 0; int pending = 0;
EINA_LIST_FOREACH(e_comp_list(), l, c) E_CLIENT_FOREACH(e_comp, ec)
E_CLIENT_FOREACH(c, ec) {
{ if (e_client_util_ignored_get(ec)) continue;
if (e_client_util_ignored_get(ec)) continue; if (!ec->internal) pending++;
if (!ec->internal) pending++; }
}
if (pending == 0) goto after; if (pending == 0) goto after;
else if (_e_sys_logout_confirm_dialog) else if (_e_sys_logout_confirm_dialog)
{ {
@ -769,8 +756,7 @@ _e_sys_logout_after(void)
static void static void
_e_sys_logout_begin(E_Sys_Action a_after, Eina_Bool raw) _e_sys_logout_begin(E_Sys_Action a_after, Eina_Bool raw)
{ {
const Eina_List *l, *ll; const Eina_List *l;
E_Comp *c;
E_Client *ec; E_Client *ec;
E_Obj_Dialog *od; E_Obj_Dialog *od;
@ -790,11 +776,10 @@ _e_sys_logout_begin(E_Sys_Action a_after, Eina_Bool raw)
} }
_e_sys_action_after = a_after; _e_sys_action_after = a_after;
_e_sys_action_after_raw = raw; _e_sys_action_after_raw = raw;
EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(e_comp->clients, l, ec)
EINA_LIST_FOREACH(c->clients, ll, ec) {
{ e_client_act_close_begin(ec);
e_client_act_close_begin(ec); }
}
/* and poll to see if all pending windows are gone yet every 0.5 sec */ /* and poll to see if all pending windows are gone yet every 0.5 sec */
_e_sys_logout_begin_time = ecore_time_get(); _e_sys_logout_begin_time = ecore_time_get();
if (_e_sys_logout_timer) ecore_timer_del(_e_sys_logout_timer); if (_e_sys_logout_timer) ecore_timer_del(_e_sys_logout_timer);

View File

@ -1,6 +1,6 @@
#include "e.h" #include "e.h"
static void _e_test_internal(E_Comp *c); static void _e_test_internal(void);
#ifdef DESKMIRROR_TEST #ifdef DESKMIRROR_TEST
@ -30,7 +30,7 @@ deskmirror_test(void *d EINA_UNUSED)
EAPI void EAPI void
e_test(void) e_test(void)
{ {
E_LIST_FOREACH(e_comp_list(), _e_test_internal); _e_test_internal();
#ifdef DESKMIRROR_TEST #ifdef DESKMIRROR_TEST
ecore_timer_add(2.0, deskmirror_test, NULL); ecore_timer_add(2.0, deskmirror_test, NULL);
@ -67,7 +67,7 @@ _e_test_timer(void *data)
} }
static void static void
_e_test_internal(E_Comp *c) _e_test_internal(void)
{ {
_e_test_timer(NULL); _e_test_timer(NULL);
} }
@ -92,12 +92,12 @@ _e_test_delete(E_Win *win)
} }
static void static void
_e_test_internal(E_Comp *c) _e_test_internal(void)
{ {
E_Win *win; E_Win *win;
Evas_Object *o; Evas_Object *o;
win = e_win_new(c); win = e_win_new(e_comp);
evas_object_resize_callback_set(win, _e_test_resize); evas_object_resize_callback_set(win, _e_test_resize);
e_win_delete_callback_set(win, _e_test_delete); e_win_delete_callback_set(win, _e_test_delete);
e_win_placed_set(win, 0); e_win_placed_set(win, 0);
@ -130,7 +130,7 @@ _e_test_timer(void *data)
} }
static void static void
_e_test_internal(E_Comp *c) _e_test_internal(void)
{ {
E_Menu *m; E_Menu *m;
Eina_List *l; Eina_List *l;
@ -157,7 +157,7 @@ _e_test_dialog_del(void *obj)
} }
static void static void
_e_test_internal(E_Comp *c) _e_test_internal(void)
{ {
E_Dialog *dia; E_Dialog *dia;
@ -188,7 +188,7 @@ _e_test_click(void *data, Evas *e, Evas_Object *obj, void *event_info)
} }
static void static void
_e_test_internal(E_Comp *c) _e_test_internal(void)
{ {
E_Dialog *dia; E_Dialog *dia;
Evas_Object *o, *o2, *o3; Evas_Object *o, *o2, *o3;
@ -254,7 +254,7 @@ _e_test_timer(void *data)
} }
static void static void
_e_test_internal(E_Comp *c) _e_test_internal(void)
{ {
tcon = c; tcon = c;
_e_test_timer(NULL); _e_test_timer(NULL);
@ -293,7 +293,7 @@ _e_test_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
} }
static void static void
_e_test_internal(E_Comp *c) _e_test_internal(void)
{ {
E_Dialog *dia; E_Dialog *dia;
Evas_Coord mw, mh, vw, vh; 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 static void
_e_test_internal(E_Comp *c) _e_test_internal(void)
{ {
E_Dialog *dia; E_Dialog *dia;
Evas_Object *o; Evas_Object *o;
@ -410,7 +410,7 @@ _e_test_internal(E_Comp *c)
#elif 0 #elif 0
static void static void
_e_test_internal(E_Comp *c) _e_test_internal(void)
{ {
E_Dialog *dia; E_Dialog *dia;
Evas_Object *o; Evas_Object *o;
@ -528,7 +528,7 @@ _e_test_cb_selected(void *data, Evas_Object *obj, void *event_info)
} }
static void static void
_e_test_internal(E_Comp *c) _e_test_internal(void)
{ {
E_Dialog *dia; E_Dialog *dia;
Evas_Object *ofm, *ofm2, *of, *ob, *ot; Evas_Object *ofm, *ofm2, *of, *ob, *ot;
@ -641,7 +641,7 @@ _e_test_cb_selected(void *data, Evas_Object *obj)
} }
static void static void
_e_test_internal(E_Comp *c) _e_test_internal(void)
{ {
E_Dialog *dia; E_Dialog *dia;
Evas_Object *o; Evas_Object *o;
@ -674,7 +674,7 @@ _e_test_cb_ok(E_Color_Dialog *dia, E_Color *color, void *data)
} }
static void static void
_e_test_internal(E_Comp *c) _e_test_internal(void)
{ {
E_Color_Dialog *d; E_Color_Dialog *d;
@ -685,7 +685,7 @@ _e_test_internal(E_Comp *c)
#elif 0 #elif 0
static void static void
_e_test_internal(E_Comp *c) _e_test_internal(void)
{ {
E_Dialog *dia; E_Dialog *dia;
Evas_Object *o, *ob, *of; Evas_Object *o, *ob, *of;
@ -754,7 +754,7 @@ _e_test_internal(E_Comp *c)
} }
static void static void
_e_test_internal(E_Comp *c) _e_test_internal(void)
{ {
ecore_timer_add(1.0, _e_test_timer, c); ecore_timer_add(1.0, _e_test_timer, c);
} }
@ -821,7 +821,7 @@ _e_test_timer(void *data)
} }
static void static void
_e_test_internal(E_Comp *c) _e_test_internal(void)
{ {
ecore_timer_add(1.0, _e_test_timer, c); ecore_timer_add(1.0, _e_test_timer, c);
} }
@ -888,14 +888,14 @@ _e_test_timer(void *data)
} }
static void static void
_e_test_internal(E_Comp *c) _e_test_internal(void)
{ {
ecore_timer_add(1.0, _e_test_timer, c); ecore_timer_add(1.0, _e_test_timer, c);
} }
#else #else
static void 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 * EAPI E_Zone *
e_util_comp_zone_number_get(int c_num, int zone_num) e_util_comp_zone_number_get(int c_num, int zone_num)
{ {
E_Comp *c; return e_comp_zone_number_get(e_comp, zone_num);
c = e_comp_number_get(c_num);
if (!c) return NULL;
return e_comp_zone_number_get(c, zone_num);
} }
EAPI E_Zone * EAPI E_Zone *
e_util_comp_zone_id_get(int c_num, int id) e_util_comp_zone_id_get(int c_num, int id)
{ {
E_Comp *c; return e_comp_zone_id_get(e_comp, id);
c = e_comp_number_get(c_num);
if (!c) return NULL;
return e_comp_zone_id_get(c, id);
} }
EAPI int EAPI int
@ -202,7 +194,7 @@ e_util_immortal_check(void)
{ {
Eina_List *wins; Eina_List *wins;
wins = e_clients_immortal_list(NULL); wins = e_clients_immortal_list();
if (wins) if (wins)
{ {
e_util_dialog_show(_("Cannot exit - immortal windows."), e_util_dialog_show(_("Cannot exit - immortal windows."),
@ -1019,25 +1011,21 @@ EAPI Eina_Bool
e_util_fullscreen_any(void) e_util_fullscreen_any(void)
{ {
E_Zone *zone; E_Zone *zone;
const Eina_List *lc, *lz; const Eina_List *lz;
E_Comp *c;
E_Desk *desk; E_Desk *desk;
int x, y; int x, y;
EINA_LIST_FOREACH(e_comp_list(), lc, c) EINA_LIST_FOREACH(e_comp->zones, lz, zone)
{ {
EINA_LIST_FOREACH(c->zones, lz, zone) if (zone->fullscreen > 0) return EINA_TRUE;
{
if (zone->fullscreen > 0) return EINA_TRUE;
for (x = 0; x < zone->desk_x_count; x++) for (x = 0; x < zone->desk_x_count; x++)
for (y = 0; y < zone->desk_y_count; y++) for (y = 0; y < zone->desk_y_count; y++)
{ {
desk = e_desk_at_xy_get(zone, x, y); desk = e_desk_at_xy_get(zone, x, y);
if ((desk) && (desk->fullscreen_clients)) if ((desk) && (desk->fullscreen_clients))
return EINA_TRUE; return EINA_TRUE;
} }
}
} }
return EINA_FALSE; 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 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_match(const char *str, const char *glob);
EAPI int e_util_glob_case_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); EINA_DEPRECATED 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_number_get(int con_num, int zone_num);
EAPI int e_util_head_exec(int head, const char *cmd); 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_strcasecmp(const char *s1, const char *s2);
EAPI int e_util_strcmp(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 else
{ {
E_Pixmap *cp; E_Pixmap *cp;
E_Comp *c = NULL;
const char *title; const char *title;
ecore_evas_name_class_set(ee, "E", "_e_internal_window"); 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); cp = e_pixmap_new(type, win);
EINA_SAFETY_ON_NULL_RETURN_VAL(cp, EINA_TRUE); EINA_SAFETY_ON_NULL_RETURN_VAL(cp, EINA_TRUE);
/* if (eina_list_count(e_comp_list()) > 1) */ ctx->client = e_client_new(e_comp, cp, 0, 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);
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx->client, EINA_TRUE); EINA_SAFETY_ON_NULL_RETURN_VAL(ctx->client, EINA_TRUE);
} }
ctx->client->placed = ctx->placed | ctx->centered; ctx->client->placed = ctx->placed | ctx->centered;

View File

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

View File

@ -65,13 +65,11 @@ e_zone_shutdown(void)
EAPI void EAPI void
e_zone_all_edge_flip_eval(void) e_zone_all_edge_flip_eval(void)
{ {
const Eina_List *l, *ll; const Eina_List *l;
E_Comp *c;
E_Zone *zone; E_Zone *zone;
EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(e_comp->zones, l, zone)
EINA_LIST_FOREACH(c->zones, ll, zone) e_zone_edge_flip_eval(zone);
e_zone_edge_flip_eval(zone);
} }
static void static void
@ -502,8 +500,6 @@ e_zone_flip_coords_handle(E_Zone *zone,
if (next_zone->y != cy) one_row = 0; 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)) if (!E_INSIDE(x, y, zone->x, zone->y, zone->w, zone->h))
goto noflip; goto noflip;
if ((one_row) && (y == 0)) if ((one_row) && (y == 0))
@ -808,56 +804,48 @@ e_zone_desk_linear_flip_to(E_Zone *zone,
EAPI void EAPI void
e_zone_edge_enable(void) e_zone_edge_enable(void)
{ {
const Eina_List *l, *ll; const Eina_List *l;
E_Comp *c;
E_Zone *zone; E_Zone *zone;
EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(e_comp->zones, l, zone)
{ {
EINA_LIST_FOREACH(c->zones, ll, zone) if (zone->edge.left) evas_object_show(zone->edge.left);
{ if (zone->edge.right) evas_object_show(zone->edge.right);
if (zone->edge.left) evas_object_show(zone->edge.left); if (zone->edge.top) evas_object_show(zone->edge.top);
if (zone->edge.right) evas_object_show(zone->edge.right); if (zone->edge.bottom) evas_object_show(zone->edge.bottom);
if (zone->edge.top) evas_object_show(zone->edge.top); if (zone->corner.left_top) evas_object_show(zone->corner.left_top);
if (zone->edge.bottom) evas_object_show(zone->edge.bottom); if (zone->corner.top_left) evas_object_show(zone->corner.top_left);
if (zone->corner.left_top) evas_object_show(zone->corner.left_top); if (zone->corner.top_right) evas_object_show(zone->corner.top_right);
if (zone->corner.top_left) evas_object_show(zone->corner.top_left); if (zone->corner.right_top) evas_object_show(zone->corner.right_top);
if (zone->corner.top_right) evas_object_show(zone->corner.top_right); if (zone->corner.right_bottom) evas_object_show(zone->corner.right_bottom);
if (zone->corner.right_top) evas_object_show(zone->corner.right_top); if (zone->corner.bottom_right) evas_object_show(zone->corner.bottom_right);
if (zone->corner.right_bottom) evas_object_show(zone->corner.right_bottom); if (zone->corner.bottom_left) evas_object_show(zone->corner.bottom_left);
if (zone->corner.bottom_right) evas_object_show(zone->corner.bottom_right); if (zone->corner.left_bottom) evas_object_show(zone->corner.left_bottom);
if (zone->corner.bottom_left) evas_object_show(zone->corner.bottom_left); e_zone_edge_flip_eval(zone);
if (zone->corner.left_bottom) evas_object_show(zone->corner.left_bottom);
e_zone_edge_flip_eval(zone);
}
} }
} }
EAPI void EAPI void
e_zone_edge_disable(void) e_zone_edge_disable(void)
{ {
const Eina_List *l, *ll; const Eina_List *l;
E_Comp *c;
E_Zone *zone; E_Zone *zone;
EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(e_comp->zones, l, zone)
{ {
EINA_LIST_FOREACH(c->zones, ll, zone) zone->flip.switching = E_ZONE_EDGE_NONE;
{ if (zone->edge.left) evas_object_hide(zone->edge.left);
zone->flip.switching = E_ZONE_EDGE_NONE; if (zone->edge.right) evas_object_hide(zone->edge.right);
if (zone->edge.left) evas_object_hide(zone->edge.left); if (zone->edge.top) evas_object_hide(zone->edge.top);
if (zone->edge.right) evas_object_hide(zone->edge.right); if (zone->edge.bottom) evas_object_hide(zone->edge.bottom);
if (zone->edge.top) evas_object_hide(zone->edge.top); if (zone->corner.left_top) evas_object_hide(zone->corner.left_top);
if (zone->edge.bottom) evas_object_hide(zone->edge.bottom); if (zone->corner.top_left) evas_object_hide(zone->corner.top_left);
if (zone->corner.left_top) evas_object_hide(zone->corner.left_top); if (zone->corner.top_right) evas_object_hide(zone->corner.top_right);
if (zone->corner.top_left) evas_object_hide(zone->corner.top_left); if (zone->corner.right_top) evas_object_hide(zone->corner.right_top);
if (zone->corner.top_right) evas_object_hide(zone->corner.top_right); if (zone->corner.right_bottom) evas_object_hide(zone->corner.right_bottom);
if (zone->corner.right_top) evas_object_hide(zone->corner.right_top); if (zone->corner.bottom_right) evas_object_hide(zone->corner.bottom_right);
if (zone->corner.right_bottom) evas_object_hide(zone->corner.right_bottom); if (zone->corner.bottom_left) evas_object_hide(zone->corner.bottom_left);
if (zone->corner.bottom_right) evas_object_hide(zone->corner.bottom_right); if (zone->corner.left_bottom) evas_object_hide(zone->corner.left_bottom);
if (zone->corner.bottom_left) evas_object_hide(zone->corner.bottom_left);
if (zone->corner.left_bottom) evas_object_hide(zone->corner.left_bottom);
}
} }
} }
@ -1015,139 +1003,127 @@ e_zone_edge_flip_eval(E_Zone *zone)
EAPI void EAPI void
e_zone_edge_new(E_Zone_Edge edge) e_zone_edge_new(E_Zone_Edge edge)
{ {
const Eina_List *l, *ll; const Eina_List *l;
E_Comp *c;
E_Zone *zone; E_Zone *zone;
int cw, ch; int cw, ch;
if (edge == E_ZONE_EDGE_NONE) return; 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(e_comp->zones, l, zone)
{ {
EINA_LIST_FOREACH(c->zones, ll, zone) // don't allow bindings on edges that are on the boundary
// between zones
if (e_zone_exists_direction(zone, edge)) continue;
cw = zone->w * E_ZONE_CORNER_RATIO;
ch = zone->h * E_ZONE_CORNER_RATIO;
switch (edge)
{ {
// don't allow bindings on edges that are on the boundary
// between zones
if (e_zone_exists_direction(zone, edge)) continue;
cw = zone->w * E_ZONE_CORNER_RATIO;
ch = zone->h * E_ZONE_CORNER_RATIO;
switch (edge)
{
#define EDGE_NEW(MEMBER, X, Y, W, H) do { \ #define EDGE_NEW(MEMBER, X, Y, W, H) do { \
if (!zone->MEMBER) \ 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_name_set(zone->MEMBER, #MEMBER); \
evas_object_move(zone->MEMBER, (X), (Y)); \ evas_object_move(zone->MEMBER, (X), (Y)); \
evas_object_resize(zone->MEMBER, (W), (H)); \ evas_object_resize(zone->MEMBER, (W), (H)); \
evas_object_color_set(zone->MEMBER, 0, 0, 0, 0); \ evas_object_color_set(zone->MEMBER, 0, 0, 0, 0); \
evas_object_event_callback_add(zone->MEMBER, EVAS_CALLBACK_MOUSE_MOVE, _e_zone_cb_mouse_move, zone); \ evas_object_event_callback_add(zone->MEMBER, EVAS_CALLBACK_MOUSE_MOVE, _e_zone_cb_mouse_move, zone); \
evas_object_event_callback_add(zone->MEMBER, EVAS_CALLBACK_MOUSE_IN, _e_zone_cb_mouse_in, zone); \ evas_object_event_callback_add(zone->MEMBER, EVAS_CALLBACK_MOUSE_IN, _e_zone_cb_mouse_in, zone); \
evas_object_event_callback_add(zone->MEMBER, EVAS_CALLBACK_MOUSE_OUT, _e_zone_cb_mouse_out, zone); \ evas_object_event_callback_add(zone->MEMBER, EVAS_CALLBACK_MOUSE_OUT, _e_zone_cb_mouse_out, zone); \
evas_object_event_callback_add(zone->MEMBER, EVAS_CALLBACK_MOUSE_DOWN, _e_zone_cb_mouse_down, zone); \ evas_object_event_callback_add(zone->MEMBER, EVAS_CALLBACK_MOUSE_DOWN, _e_zone_cb_mouse_down, zone); \
evas_object_event_callback_add(zone->MEMBER, EVAS_CALLBACK_MOUSE_UP, _e_zone_cb_mouse_up, zone); \ evas_object_event_callback_add(zone->MEMBER, EVAS_CALLBACK_MOUSE_UP, _e_zone_cb_mouse_up, zone); \
evas_object_show(zone->MEMBER); \ evas_object_show(zone->MEMBER); \
} \ } \
} while (0) } while (0)
case E_ZONE_EDGE_LEFT: case E_ZONE_EDGE_LEFT:
EDGE_NEW(edge.left, zone->x, zone->y + ch, 1, zone->h - 2 * ch); EDGE_NEW(edge.left, zone->x, zone->y + ch, 1, zone->h - 2 * ch);
break; break;
case E_ZONE_EDGE_RIGHT: case E_ZONE_EDGE_RIGHT:
EDGE_NEW(edge.right, zone->x + zone->w - 1, zone->y + ch, 1, zone->h - 2 * ch); EDGE_NEW(edge.right, zone->x + zone->w - 1, zone->y + ch, 1, zone->h - 2 * ch);
break; break;
case E_ZONE_EDGE_TOP: case E_ZONE_EDGE_TOP:
EDGE_NEW(edge.top, zone->x + 1 + cw, zone->y, zone->w - 2 * cw - 2, 1); EDGE_NEW(edge.top, zone->x + 1 + cw, zone->y, zone->w - 2 * cw - 2, 1);
break; break;
case E_ZONE_EDGE_BOTTOM: case E_ZONE_EDGE_BOTTOM:
EDGE_NEW(edge.bottom, zone->x + 1 + cw, zone->y + zone->h - 1, zone->w - 2 - 2 * cw, 1); EDGE_NEW(edge.bottom, zone->x + 1 + cw, zone->y + zone->h - 1, zone->w - 2 - 2 * cw, 1);
break; break;
case E_ZONE_EDGE_TOP_LEFT: case E_ZONE_EDGE_TOP_LEFT:
EDGE_NEW(corner.left_top, zone->x, zone->y, 1, ch); EDGE_NEW(corner.left_top, zone->x, zone->y, 1, ch);
EDGE_NEW(corner.top_left, zone->x + 1, zone->y, cw, 1); EDGE_NEW(corner.top_left, zone->x + 1, zone->y, cw, 1);
break; break;
case E_ZONE_EDGE_TOP_RIGHT: case E_ZONE_EDGE_TOP_RIGHT:
EDGE_NEW(corner.top_right, zone->x + zone->w - cw - 2, zone->y, cw, 1); EDGE_NEW(corner.top_right, zone->x + zone->w - cw - 2, zone->y, cw, 1);
EDGE_NEW(corner.right_top, zone->x + zone->w - 1, zone->y, 1, ch); EDGE_NEW(corner.right_top, zone->x + zone->w - 1, zone->y, 1, ch);
break; break;
case E_ZONE_EDGE_BOTTOM_RIGHT: case E_ZONE_EDGE_BOTTOM_RIGHT:
EDGE_NEW(corner.right_bottom, zone->x + zone->w - 1, zone->y + zone->h - ch, 1, ch); EDGE_NEW(corner.right_bottom, zone->x + zone->w - 1, zone->y + zone->h - ch, 1, ch);
EDGE_NEW(corner.bottom_right, zone->x + zone->w - cw - 2, zone->y + zone->h - 1, cw, 1); EDGE_NEW(corner.bottom_right, zone->x + zone->w - cw - 2, zone->y + zone->h - 1, cw, 1);
break; break;
case E_ZONE_EDGE_BOTTOM_LEFT: case E_ZONE_EDGE_BOTTOM_LEFT:
EDGE_NEW(corner.bottom_left, zone->x + 1, zone->y + zone->h - 1, cw, 1); EDGE_NEW(corner.bottom_left, zone->x + 1, zone->y + zone->h - 1, cw, 1);
EDGE_NEW(corner.left_bottom, zone->x, zone->y + zone->h - ch, 1, ch); EDGE_NEW(corner.left_bottom, zone->x, zone->y + zone->h - ch, 1, ch);
break; break;
default: continue; default: continue;
}
if (e_config->fullscreen_flip)
e_zone_edge_win_layer_set(zone, E_LAYER_CLIENT_EDGE_FULLSCREEN);
else
e_zone_edge_win_layer_set(zone, E_LAYER_CLIENT_EDGE);
} }
if (e_config->fullscreen_flip)
e_zone_edge_win_layer_set(zone, E_LAYER_CLIENT_EDGE_FULLSCREEN);
else
e_zone_edge_win_layer_set(zone, E_LAYER_CLIENT_EDGE);
} }
} }
EAPI void EAPI void
e_zone_edge_free(E_Zone_Edge edge) e_zone_edge_free(E_Zone_Edge edge)
{ {
const Eina_List *l, *ll; const Eina_List *l;
E_Comp *c;
E_Zone *zone; E_Zone *zone;
if (edge == E_ZONE_EDGE_NONE) return; if (edge == E_ZONE_EDGE_NONE) return;
EINA_LIST_FOREACH(e_comp_list(), l, c) EINA_LIST_FOREACH(e_comp->zones, l, zone)
{ {
EINA_LIST_FOREACH(c->zones, ll, zone) if (zone->flip.switching == edge)
zone->flip.switching = E_ZONE_EDGE_NONE;
switch (edge)
{ {
if (zone->flip.switching == edge) case E_ZONE_EDGE_NONE:
zone->flip.switching = E_ZONE_EDGE_NONE; /* noop */
switch (edge) break;
{
case E_ZONE_EDGE_NONE:
/* noop */
break;
case E_ZONE_EDGE_LEFT: case E_ZONE_EDGE_LEFT:
E_FREE_FUNC(zone->edge.left, evas_object_del); E_FREE_FUNC(zone->edge.left, evas_object_del);
break; break;
case E_ZONE_EDGE_RIGHT: case E_ZONE_EDGE_RIGHT:
E_FREE_FUNC(zone->edge.right, evas_object_del); E_FREE_FUNC(zone->edge.right, evas_object_del);
break; break;
case E_ZONE_EDGE_TOP: case E_ZONE_EDGE_TOP:
E_FREE_FUNC(zone->edge.top, evas_object_del); E_FREE_FUNC(zone->edge.top, evas_object_del);
break; break;
case E_ZONE_EDGE_BOTTOM: case E_ZONE_EDGE_BOTTOM:
E_FREE_FUNC(zone->edge.bottom, evas_object_del); E_FREE_FUNC(zone->edge.bottom, evas_object_del);
break; break;
case E_ZONE_EDGE_TOP_LEFT: case E_ZONE_EDGE_TOP_LEFT:
E_FREE_FUNC(zone->corner.left_top, evas_object_del); E_FREE_FUNC(zone->corner.left_top, evas_object_del);
E_FREE_FUNC(zone->corner.top_left, evas_object_del); E_FREE_FUNC(zone->corner.top_left, evas_object_del);
break; break;
case E_ZONE_EDGE_TOP_RIGHT: case E_ZONE_EDGE_TOP_RIGHT:
E_FREE_FUNC(zone->corner.top_right, evas_object_del); E_FREE_FUNC(zone->corner.top_right, evas_object_del);
E_FREE_FUNC(zone->corner.right_top, evas_object_del); E_FREE_FUNC(zone->corner.right_top, evas_object_del);
break; break;
case E_ZONE_EDGE_BOTTOM_RIGHT: case E_ZONE_EDGE_BOTTOM_RIGHT:
E_FREE_FUNC(zone->corner.right_bottom, evas_object_del); E_FREE_FUNC(zone->corner.right_bottom, evas_object_del);
E_FREE_FUNC(zone->corner.bottom_right, evas_object_del); E_FREE_FUNC(zone->corner.bottom_right, evas_object_del);
break; break;
case E_ZONE_EDGE_BOTTOM_LEFT: case E_ZONE_EDGE_BOTTOM_LEFT:
E_FREE_FUNC(zone->corner.bottom_left, evas_object_del); E_FREE_FUNC(zone->corner.bottom_left, evas_object_del);
E_FREE_FUNC(zone->corner.left_bottom, evas_object_del); E_FREE_FUNC(zone->corner.left_bottom, evas_object_del);
break; break;
}
} }
} }
} }

View File

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

View File

@ -187,8 +187,7 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
static int static int
_basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{ {
const Eina_List *l, *ll; const Eina_List *l;
E_Comp *comp;
E_Zone *zone; E_Zone *zone;
E_Config_Binding_Edge *bi, *bi2; E_Config_Binding_Edge *bi, *bi2;
E_Layer layer; E_Layer layer;
@ -231,11 +230,8 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
else else
layer = E_LAYER_CLIENT_EDGE; layer = E_LAYER_CLIENT_EDGE;
EINA_LIST_FOREACH(e_comp_list(), l, comp) EINA_LIST_FOREACH(e_comp->zones, l, zone)
{ e_zone_edge_win_layer_set(zone, layer);
EINA_LIST_FOREACH(comp->zones, ll, zone)
e_zone_edge_win_layer_set(zone, layer);
}
} }
e_config->fullscreen_flip = cfdata->fullscreen_flip; 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 _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 _login_method_change(void *data, Evas_Object *obj, void *event_info);
static void _cb_login_change(void *data, Evas_Object *obj); 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); 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; E_Config_Desklock_Background *bg;
int x; 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) EINA_LIST_FOREACH(e_config->desklock_backgrounds, l, bg)
cfdata->bgs = eina_list_append(cfdata->bgs, desklock_bg_dup(bg, NULL)); cfdata->bgs = eina_list_append(cfdata->bgs, desklock_bg_dup(bg, NULL));
if (!cfdata->bgs) 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; E_Config_XKB_Layout *cl;
int grp = 0; int grp = 0;
Evas_Object *otb, *ol, *ow, *of, *oc; Evas_Object *otb, *ol, *ow, *of, *oc;
const Eina_List *l, *ll; const Eina_List *l;
E_Zone *zone; E_Zone *zone;
E_Radio_Group *rg; E_Radio_Group *rg;
E_Comp *comp;
int screen_count, x = 0; int screen_count, x = 0;
e_dialog_resizable_set(cfd->dia, 1); e_dialog_resizable_set(cfd->dia, 1);
@ -406,17 +404,16 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data
cfdata->gui.o_table = e_widget_table_add(evas, 1); cfdata->gui.o_table = e_widget_table_add(evas, 1);
EINA_LIST_FOREACH(e_comp_list(), l, comp) EINA_LIST_FOREACH(e_comp->zones, l, zone)
EINA_LIST_FOREACH(comp->zones, ll, zone) {
{ ow = e_widget_preview_add(evas, 100, 140);
ow = e_widget_preview_add(evas, 100, 140); cfdata->gui.bgs = eina_list_append(cfdata->gui.bgs, ow);
cfdata->gui.bgs = eina_list_append(cfdata->gui.bgs, ow); evas_object_data_set(ow, "zone", zone);
evas_object_data_set(ow, "zone", zone); e_widget_disabled_set(ow,
e_widget_disabled_set(ow, (cfdata->bg_method < E_DESKLOCK_BACKGROUND_METHOD_CUSTOM));
(cfdata->bg_method < E_DESKLOCK_BACKGROUND_METHOD_CUSTOM)); evas_object_event_callback_add(ow, EVAS_CALLBACK_MOUSE_DOWN, _cb_bg_mouse_down, cfdata);
evas_object_event_callback_add(ow, EVAS_CALLBACK_MOUSE_DOWN, _cb_bg_mouse_down, cfdata); e_widget_table_object_append(cfdata->gui.o_table, ow, x++, 0, 1, 1, 1, 1, 1, 1);
e_widget_table_object_append(cfdata->gui.o_table, ow, x++, 0, 1, 1, 1, 1, 1, 1); }
}
_cb_method_change(cfdata, NULL, NULL); _cb_method_change(cfdata, NULL, NULL);
e_widget_list_object_append(ol, cfdata->gui.o_table, 1, 1, 0.5); e_widget_list_object_append(ol, cfdata->gui.o_table, 1, 1, 0.5);
e_widget_toolbook_page_append(otb, NULL, _("Wallpaper"), ol, e_widget_toolbook_page_append(otb, NULL, _("Wallpaper"), ol,
@ -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)); 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 static void
_cb_bg_mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event __UNUSED__) _cb_bg_mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event __UNUSED__)
{ {

View File

@ -117,13 +117,11 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
if ((cfdata->x != e_config->zone_desks_x_count) || if ((cfdata->x != e_config->zone_desks_x_count) ||
(cfdata->y != e_config->zone_desks_y_count)) (cfdata->y != e_config->zone_desks_y_count))
{ {
const Eina_List *l, *ll; const Eina_List *l;
E_Comp *comp;
E_Zone *zone; E_Zone *zone;
EINA_LIST_FOREACH(e_comp_list(), l, comp) EINA_LIST_FOREACH(e_comp->zones, l, zone)
EINA_LIST_FOREACH(comp->zones, ll, zone) e_zone_desk_count_set(zone, cfdata->x, cfdata->y);
e_zone_desk_count_set(zone, cfdata->x, cfdata->y);
} }
eina_stringshare_replace(&e_config->desk_flip_animate_type, NULL); eina_stringshare_replace(&e_config->desk_flip_animate_type, NULL);
@ -146,19 +144,17 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
static int static int
_basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) _basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{ {
const Eina_List *l, *ll; const Eina_List *l;
E_Comp *comp;
E_Zone *zone; E_Zone *zone;
EINA_LIST_FOREACH(e_comp_list(), l, comp) EINA_LIST_FOREACH(e_comp->zones, l, zone)
EINA_LIST_FOREACH(comp->zones, ll, zone) {
{ int x, y;
int x, y;
e_zone_desk_count_get(zone, &x, &y); e_zone_desk_count_get(zone, &x, &y);
if ((x != cfdata->x) || (y != cfdata->y)) if ((x != cfdata->x) || (y != cfdata->y))
return 1; return 1;
} }
return ((e_util_strcasecmp(eina_list_nth(cfdata->comp_effects, cfdata->flip_mode), e_config->desk_flip_animate_type)) || return ((e_util_strcasecmp(eina_list_nth(cfdata->comp_effects, cfdata->flip_mode), e_config->desk_flip_animate_type)) ||
(e_config->desk_flip_animate_interpolation != cfdata->flip_interp) || (e_config->desk_flip_animate_interpolation != cfdata->flip_interp) ||

View File

@ -98,9 +98,6 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
static int static int
_basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata) _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->use_e_cursor = cfdata->use_e_cursor;
e_config->show_cursor = cfdata->show_cursor; e_config->show_cursor = cfdata->show_cursor;
e_config->idle_cursor = cfdata->idle_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(); e_config_save_queue();
/* Apply the above settings */ /* Apply the above settings */
EINA_LIST_FOREACH(e_comp_list(), l, comp) if ((e_comp->comp_type == E_PIXMAP_TYPE_X) && (!e_config->show_cursor))
{ e_pointer_hide(e_comp->pointer);
if ((comp->comp_type == E_PIXMAP_TYPE_X) && (!e_config->show_cursor)) else
e_pointer_hide(comp->pointer); e_pointers_size_set(e_config->cursor_size);
else
e_pointers_size_set(e_config->cursor_size);
}
e_mouse_update(); e_mouse_update();

View File

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

View File

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

View File

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

View File

@ -30,8 +30,7 @@ EAPI E_Module_Api e_modapi =
EAPI void * EAPI void *
e_modapi_init(E_Module *m) e_modapi_init(E_Module *m)
{ {
const Eina_List *l, *ll; const Eina_List *l;
E_Comp *comp;
E_Zone *zone; E_Zone *zone;
conf_module = m; conf_module = m;
@ -65,13 +64,12 @@ e_modapi_init(E_Module *m)
e_fwin_init(); e_fwin_init();
/* Hook into zones */ /* Hook into zones */
EINA_LIST_FOREACH(e_comp_list(), l, comp) EINA_LIST_FOREACH(e_comp->zones, l, zone)
EINA_LIST_FOREACH(comp->zones, ll, zone) {
{ if (e_fwin_zone_find(zone)) continue;
if (e_fwin_zone_find(zone)) continue; if (e_config->show_desktop_icons)
if (e_config->show_desktop_icons) e_fwin_zone_new(zone, e_mod_fileman_path_find(zone));
e_fwin_zone_new(zone, e_mod_fileman_path_find(zone)); }
}
zone_add_handler = ecore_event_handler_add(E_EVENT_ZONE_ADD, zone_add_handler = ecore_event_handler_add(E_EVENT_ZONE_ADD,
_e_mod_zone_add, NULL); _e_mod_zone_add, NULL);
@ -87,8 +85,7 @@ e_modapi_init(E_Module *m)
EAPI int EAPI int
e_modapi_shutdown(E_Module *m __UNUSED__) e_modapi_shutdown(E_Module *m __UNUSED__)
{ {
const Eina_List *l, *ll; const Eina_List *l;
E_Comp *comp;
E_Zone *zone; E_Zone *zone;
E_Config_Dialog *cfd; E_Config_Dialog *cfd;
@ -98,9 +95,8 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
zone_add_handler = NULL; zone_add_handler = NULL;
/* Unhook zone fm */ /* Unhook zone fm */
EINA_LIST_FOREACH(e_comp_list(), l, comp) EINA_LIST_FOREACH(e_comp->zones, l, zone)
EINA_LIST_FOREACH(comp->zones, ll, zone) e_fwin_zone_shutdown(zone);
e_fwin_zone_shutdown(zone);
e_fwin_nav_shutdown(); 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; E_Radio_Group *rg;
Evas_Object *o, *of, *ob; Evas_Object *o, *of, *ob;
Evas_Object *show_check = NULL; Evas_Object *show_check = NULL;
E_Comp *comp;
const Eina_List *l;
int zone_count = 0; int zone_count = 0;
o = e_widget_list_add(evas, 0, 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); of = e_widget_framelist_add(evas, _("Screen"), 0);
EINA_LIST_FOREACH(e_comp_list(), l, comp) zone_count = eina_list_count(e_comp->zones);
zone_count += eina_list_count(comp->zones);
if (zone_count <= 1) cfdata->zone_policy = 1; 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 * EAPI void *
e_modapi_init(E_Module *m) e_modapi_init(E_Module *m)
{ {
const Eina_List *cl, *zl;
E_Comp *comp;
E_Zone *zone; E_Zone *zone;
Ecore_X_Window *zones; Ecore_X_Window *zones;
int zcount = 0; int zcount = 0;
@ -65,9 +63,7 @@ e_modapi_init(E_Module *m)
e_mod_kbd_hide(); e_mod_kbd_hide();
/* loop zones and get count */ /* loop zones and get count */
EINA_LIST_FOREACH(e_comp_list(), cl, comp) zcount = eina_list_count(e_comp->zones);
EINA_LIST_FOREACH(comp->zones, zl, zone)
zcount++;
/* allocate enough zones */ /* allocate enough zones */
zones = calloc(zcount, sizeof(Ecore_X_Window)); zones = calloc(zcount, sizeof(Ecore_X_Window));
@ -93,29 +89,26 @@ e_modapi_init(E_Module *m)
zcount = 0; zcount = 0;
/* loop the zones and create quickpanels for each one */ /* loop the zones and create quickpanels for each one */
EINA_LIST_FOREACH(e_comp_list(), cl, comp) EINA_LIST_FOREACH(e_comp->zones, zl, zone)
{ {
EINA_LIST_FOREACH(comp->zones, zl, zone) E_Illume_Quickpanel *qp;
{
E_Illume_Quickpanel *qp;
/* set zone window in list of zones */ /* set zone window in list of zones */
zones[zcount] = zone->black_win; zones[zcount] = zone->black_win;
/* increment zone count */ /* increment zone count */
zcount++; zcount++;
/* try to create a new quickpanel for this zone */ /* try to create a new quickpanel for this zone */
if (!(qp = e_mod_quickpanel_new(zone))) continue; if (!(qp = e_mod_quickpanel_new(zone))) continue;
/* append new qp to list */ /* append new qp to list */
_e_illume_qps = eina_list_append(_e_illume_qps, qp); _e_illume_qps = eina_list_append(_e_illume_qps, qp);
}
/* set the zone list on this root. This is needed for some
* 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);
} }
/* set the zone list on this root. This is needed for some
* 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 variable */
free(zones); free(zones);

View File

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

View File

@ -181,37 +181,35 @@ _notification_theme_cb_find(Popup_Data *popup,
const char *emission __UNUSED__, const char *emission __UNUSED__,
const char *source __UNUSED__) const char *source __UNUSED__)
{ {
const Eina_List *l, *ll; const Eina_List *l;
E_Client *ec; E_Client *ec;
E_Comp *comp;
if (!popup->app_name) return; if (!popup->app_name) return;
EINA_LIST_FOREACH(e_comp_list(), l, comp) EINA_LIST_FOREACH(e_comp->clients, l, ec)
EINA_LIST_FOREACH(comp->clients, ll, ec) {
{ size_t len, test;
size_t len, test; const char *name;
const char *name;
if (e_client_util_ignored_get(ec)) continue; if (e_client_util_ignored_get(ec)) continue;
len = strlen(popup->app_name); len = strlen(popup->app_name);
name = e_client_util_name_get(ec); name = e_client_util_name_get(ec);
if (!name) continue; if (!name) continue;
test = eina_strlen_bounded(name, len + 1); test = eina_strlen_bounded(name, len + 1);
/* We can't be sure that the app_name really match the application name. /* We can't be sure that the app_name really match the application name.
* Some plugin put their name instead. But this search gives some good * Some plugin put their name instead. But this search gives some good
* results. * results.
*/ */
if (strncasecmp(name, popup->app_name, (test < len) ? test : len)) if (strncasecmp(name, popup->app_name, (test < len) ? test : len))
continue; continue;
e_desk_show(ec->desk); e_desk_show(ec->desk);
evas_object_show(ec->frame); evas_object_show(ec->frame);
evas_object_raise(ec->frame); evas_object_raise(ec->frame);
e_client_focus_set_with_pointer(ec); e_client_focus_set_with_pointer(ec);
break; break;
} }
} }
static void static void

View File

@ -1734,7 +1734,6 @@ _pager_cb_event_bg_update(void *data __UNUSED__, int type __UNUSED__, void *even
Eina_List *l, *ll; Eina_List *l, *ll;
Pager *p; Pager *p;
Pager_Desk *pd; Pager_Desk *pd;
E_Comp *comp;
E_Zone *zone; E_Zone *zone;
E_Desk *desk; 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); _pager_desk_livethumb_setup(pd);
return ECORE_CALLBACK_RENEW; return ECORE_CALLBACK_RENEW;
} }
comp = eina_list_nth(e_comp_list(), ev->manager); zone = eina_list_nth(e_comp->zones, ev->zone);
if (!comp) return ECORE_CALLBACK_RENEW;
zone = eina_list_nth(comp->zones, ev->zone);
if (!zone) return ECORE_CALLBACK_RENEW; if (!zone) return ECORE_CALLBACK_RENEW;
desk = e_desk_at_xy_get(zone, ev->desk_x, ev->desk_y); desk = e_desk_at_xy_get(zone, ev->desk_x, ev->desk_y);
if (!zone) return ECORE_CALLBACK_RENEW; 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 static int
_pol_cfd_data_basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata) _pol_cfd_data_basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
{ {
E_Comp *comp;
E_Zone *zone; E_Zone *zone;
E_Desk *desk; E_Desk *desk;
Pol_Softkey *softkey; 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) EINA_LIST_FOREACH(cfdata->conf->desks, l, d)
{ {
comp = e_comp_number_get(d->comp_num); zone = e_comp_zone_number_get(e_comp, d->zone_num);
zone = e_comp_zone_number_get(comp, d->zone_num);
desk = e_desk_at_xy_get(zone, d->x, d->y); desk = e_desk_at_xy_get(zone, d->x, d->y);
if (!desk) continue; if (!desk) continue;

View File

@ -422,10 +422,8 @@ void
e_mod_pol_desk_add(E_Desk *desk) e_mod_pol_desk_add(E_Desk *desk)
{ {
Pol_Desk *pd; Pol_Desk *pd;
E_Comp *comp;
E_Client *ec; E_Client *ec;
Pol_Softkey *softkey; Pol_Softkey *softkey;
const Eina_List *l;
pd = eina_hash_find(hash_pol_desks, &desk); pd = eina_hash_find(hash_pol_desks, &desk);
if (pd) return; if (pd) return;
@ -437,12 +435,11 @@ e_mod_pol_desk_add(E_Desk *desk)
eina_hash_add(hash_pol_desks, &desk, pd); eina_hash_add(hash_pol_desks, &desk, pd);
/* add clients */ /* add clients */
EINA_LIST_FOREACH(e_comp_list(), l, comp) E_CLIENT_FOREACH(e_comp, ec)
E_CLIENT_FOREACH(comp, ec) {
{ if (pd->desk == ec->desk)
if (pd->desk == ec->desk) _pol_client_add(ec);
_pol_client_add(ec); }
}
/* add and show softkey */ /* add and show softkey */
if (_pol_mod->conf->use_softkey) if (_pol_mod->conf->use_softkey)
@ -534,10 +531,9 @@ EAPI void *
e_modapi_init(E_Module *m) e_modapi_init(E_Module *m)
{ {
Mod *mod; Mod *mod;
E_Comp *comp;
E_Zone *zone; E_Zone *zone;
Config_Desk *d; Config_Desk *d;
const Eina_List *l, *ll; const Eina_List *l;
int i, n; int i, n;
char buf[PATH_MAX]; char buf[PATH_MAX];
@ -560,32 +556,31 @@ e_modapi_init(E_Module *m)
e_mod_pol_conf_init(mod); e_mod_pol_conf_init(mod);
EINA_LIST_FOREACH(e_comp_list(), l, comp) EINA_LIST_FOREACH(e_comp->zones, l, zone)
EINA_LIST_FOREACH(comp->zones, ll, zone) {
{ //Eina_Bool home_add = EINA_FALSE;
//Eina_Bool home_add = EINA_FALSE; n = zone->desk_y_count * zone->desk_x_count;
n = zone->desk_y_count * zone->desk_x_count; for (i = 0; i < n; i++)
for (i = 0; i < n; i++) {
{ d = e_mod_pol_conf_desk_get_by_nums(_pol_mod->conf,
d = e_mod_pol_conf_desk_get_by_nums(_pol_mod->conf, e_comp->num,
comp->num, zone->num,
zone->num, zone->desks[i]->x,
zone->desks[i]->x, zone->desks[i]->y);
zone->desks[i]->y); if (d)
if (d) {
{ e_mod_pol_desk_add(zone->desks[i]);
e_mod_pol_desk_add(zone->desks[i]); //home_add = EINA_TRUE;
//home_add = EINA_TRUE; }
} }
}
/* FIXME: should consider the case that illume-home module /* FIXME: should consider the case that illume-home module
* is not loaded yet and make it configurable. * is not loaded yet and make it configurable.
* and also, this code will be enabled when e_policy stuff lands in e. * and also, this code will be enabled when e_policy stuff lands in e.
*/ */
//if (home_add) //if (home_add)
// e_policy_zone_home_add_request(zone); // e_policy_zone_home_add_request(zone);
} }
E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_ADD, _pol_cb_zone_add, NULL); E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_ADD, _pol_cb_zone_add, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_DEL, _pol_cb_zone_del, NULL); E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_DEL, _pol_cb_zone_del, NULL);

View File

@ -592,22 +592,19 @@ _e_qa_begin(void)
} }
if (count) if (count)
{ {
E_Comp *comp;
const Eina_List *lll;
/* some non-transient entries exist without assigned borders /* some non-transient entries exist without assigned borders
* try assigning from existing borders * try assigning from existing borders
*/ */
EINA_LIST_FOREACH(e_comp_list(), lll, comp) EINA_LIST_FOREACH(e_comp->clients, l, ec)
EINA_LIST_FOREACH(comp->clients, l, ec) {
{ if (e_client_util_ignored_get(ec)) continue;
if (e_client_util_ignored_get(ec)) continue; entry = _e_qa_entry_find_match(ec, 1);
entry = _e_qa_entry_find_match(ec, 1); if ((!entry) || entry->client) continue;
if ((!entry) || entry->client) continue; DBG("border=%p matches entry %s", ec, entry->id);
DBG("border=%p matches entry %s", ec, entry->id); _e_qa_entry_border_associate(entry, ec);
_e_qa_entry_border_associate(entry, ec); count--;
count--; if (!count) break;
if (!count) break; }
}
} }
} }

View File

@ -1535,24 +1535,20 @@ _disable_all_tiling(void)
static void static void
_foreach_desk(void (*func)(E_Desk *desk)) _foreach_desk(void (*func)(E_Desk *desk))
{ {
const Eina_List *l, *ll; const Eina_List *l;
E_Comp *comp;
E_Zone *zone; E_Zone *zone;
E_Desk *desk; E_Desk *desk;
int x, y; int x, y;
EINA_LIST_FOREACH(e_comp_list(), l, comp) EINA_LIST_FOREACH(e_comp->zones, l, zone)
{ {
EINA_LIST_FOREACH(comp->zones, ll, zone) for (x = 0; x < zone->desk_x_count; x++)
{ {
for (x = 0; x < zone->desk_x_count; x++) for (y = 0; y < zone->desk_y_count; y++)
{ {
for (y = 0; y < zone->desk_y_count; y++) desk = zone->desks[x + (y * zone->desk_x_count)];
{
desk = zone->desks[x + (y * zone->desk_x_count)];
func(desk); func(desk);
}
} }
} }
} }

View File

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