completely remove E_Manager

the final step in flattening all the canvas/screen apis
This commit is contained in:
Mike Blumenkrantz 2015-03-19 16:03:51 -04:00
parent dbcd03044e
commit 58447e9508
46 changed files with 286 additions and 573 deletions

View File

@ -61,7 +61,6 @@ src/bin/e_ipc_codec.c
src/bin/e_layout.c
src/bin/e_livethumb.c
src/bin/e_main.c
src/bin/e_manager.c
src/bin/e_maximize.c
src/bin/e_menu.c
src/bin/e_module.c

View File

@ -121,7 +121,6 @@ src/bin/e_ipc.h \
src/bin/e_layout.h \
src/bin/e_livethumb.h \
src/bin/e_log.h \
src/bin/e_manager.h \
src/bin/e_maximize.h \
src/bin/e_menu.h \
src/bin/e_mmx.h \
@ -286,7 +285,6 @@ src/bin/e_ipc_codec.c \
src/bin/e_layout.c \
src/bin/e_livethumb.c \
src/bin/e_log.c \
src/bin/e_manager.c \
src/bin/e_maximize.c \
src/bin/e_menu.c \
src/bin/e_module.c \

View File

@ -1351,9 +1351,7 @@ _e_actions_zone_get(E_Object *obj)
{
if (obj)
{
if (obj->type == (int)E_MANAGER_TYPE)
return e_zone_current_get();
else if (obj->type == (int)E_COMP_TYPE)
if (obj->type == (int)E_COMP_TYPE)
return e_zone_current_get();
else if (obj->type == (int)E_ZONE_TYPE)
return (E_Zone *)obj;
@ -1650,20 +1648,10 @@ ACT_FN_GO(screen_send_to, )
scr = strtol(params, NULL, 10);
if (errno) return;
if (eina_list_count(e_manager_list()) > 1)
{
if (scr != -1)
scr = scr % eina_list_count(e_manager_list());
if (scr < 0) scr += eina_list_count(e_manager_list());
zone2 = e_comp_zone_number_get(0);
}
else
{
if (scr != -1)
scr = scr % eina_list_count(e_comp->zones);
if (scr < 0) scr += eina_list_count(e_comp->zones);
zone2 = e_comp_zone_number_get(scr);
}
if ((zone2) && (zone != zone2))
{
ecore_evas_pointer_warp(e_comp->ee,
@ -1686,22 +1674,11 @@ ACT_FN_GO(screen_send_by, )
errno = 0;
scr = strtol(params, NULL, 10);
if (errno) return;
if (eina_list_count(e_manager_list()) > 1)
{
scr += e_comp->num;
if (scr != -1)
scr = scr % eina_list_count(e_manager_list());
if (scr < 0) scr += eina_list_count(e_manager_list());
zone2 = e_comp_zone_number_get(0);
}
else
{
scr += zone->num;
if (scr != -1)
scr = scr % eina_list_count(e_comp->zones);
if (scr < 0) scr += eina_list_count(e_comp->zones);
zone2 = e_comp_zone_number_get(scr);
}
if ((zone2) && (zone != zone2))
{
ecore_evas_pointer_warp(e_comp->ee,
@ -1873,8 +1850,8 @@ ACT_FN_GO_MOUSE(menu_show, )
m->zone = zone;
x = ev->canvas.x;
y = ev->canvas.y;
x -= e_comp->man->x;
y -= e_comp->man->y;
x -= e_comp->x;
y -= e_comp->y;
e_menu_post_deactivate_callback_set(m, _e_actions_cb_menu_end, NULL);
e_menu_activate_mouse(m, zone, x, y, 1, 1,
E_MENU_POP_DIRECTION_DOWN, ev->timestamp);

View File

@ -202,7 +202,7 @@ _e_backlight_update(void)
Ecore_X_Randr_Output *out;
int i, num = 0;
root = e_comp->man->root;
root = e_comp->root;
// try randr
if (root && xbl_avail)
{
@ -269,7 +269,7 @@ _e_backlight_set(double val)
int num = 0, i;
char *name;
root = e_comp->man->root;
root = e_comp->root;
out = ecore_x_randr_window_outputs_get(root, &num);
if ((out) && (num > 0))
{

View File

@ -313,13 +313,13 @@ e_bindings_key_reset(void)
E_Config_Binding_Key *ebk;
Eina_List *l;
e_managers_keys_ungrab();
e_comp_canvas_keys_ungrab();
E_FREE_LIST(key_bindings, _e_bindings_key_free);
EINA_LIST_FOREACH(e_bindings->key_bindings, l, ebk)
e_bindings_key_add(ebk->context, ebk->key, ebk->modifiers,
ebk->any_mod, ebk->action, ebk->params);
e_managers_keys_grab();
e_comp_canvas_keys_grab();
}
EAPI void

View File

@ -2321,8 +2321,8 @@ e_client_idler_before(void)
}
if ((!ec->new_client) && (!e_client_util_ignored_get(ec)) &&
(!E_INSIDE(ec->x, ec->y, 0, 0, e_comp->man->w - 5, e_comp->man->h - 5)) &&
(!E_INSIDE(ec->x, ec->y, 0 - ec->w + 5, 0 - ec->h + 5, e_comp->man->w - 5, e_comp->man->h - 5))
(!E_INSIDE(ec->x, ec->y, 0, 0, e_comp->w - 5, e_comp->h - 5)) &&
(!E_INSIDE(ec->x, ec->y, 0 - ec->w + 5, 0 - ec->h + 5, e_comp->w - 5, e_comp->h - 5))
)
{
if (e_config->screen_limits != E_CLIENT_OFFSCREEN_LIMIT_ALLOW_FULL)
@ -3457,7 +3457,7 @@ e_client_focused_set(E_Client *ec)
if (!focus_track_frozen)
e_client_focus_latest_set(ec);
e_hints_active_window_set(e_comp->man, ec);
e_hints_active_window_set(ec);
_e_client_event_simple(ec, E_EVENT_CLIENT_FOCUS_IN);
}

View File

@ -185,7 +185,7 @@ _e_comp_fullscreen_check(void)
while (o)
{
if (_e_comp_visible_object_is_above
(o, 0, 0, e_comp->man->w, e_comp->man->h)) return NULL;
(o, 0, 0, e_comp->w, e_comp->h)) return NULL;
o = evas_object_smart_parent_get(o);
}
return ec;
@ -633,7 +633,7 @@ _e_comp_shapes_update_comp_client_shape_comp_helper(E_Client *ec, Eina_Tiler *tb
{
x = rect->x, y = rect->y, w = rect->w, h = rect->h;
x += ec->client.x, y += ec->client.y;
E_RECTS_CLIP_TO_RECT(x, y, w, h, e_comp->man->x, e_comp->man->y, e_comp->man->w, e_comp->man->h);
E_RECTS_CLIP_TO_RECT(x, y, w, h, e_comp->x, e_comp->y, e_comp->w, e_comp->h);
if ((w < 1) || (h < 1)) continue;
//#ifdef SHAPE_DEBUG not sure we can shape check these?
//r = E_NEW(Eina_Rectangle, 1);
@ -706,10 +706,10 @@ _e_comp_shapes_update_job(void *d EINA_UNUSED)
#endif
E_FREE_LIST(e_comp->debug_rects, evas_object_del);
tb = eina_tiler_new(e_comp->man->w, e_comp->man->h);
tb = eina_tiler_new(e_comp->w, e_comp->h);
eina_tiler_tile_size_set(tb, 1, 1);
/* background */
eina_tiler_rect_add(tb, &(Eina_Rectangle){0, 0, e_comp->man->w, e_comp->man->h});
eina_tiler_rect_add(tb, &(Eina_Rectangle){0, 0, e_comp->w, e_comp->h});
ec = e_client_bottom_get();
if (ec) o = ec->frame;
@ -808,7 +808,7 @@ _e_comp_free(E_Comp *c)
{
E_FREE_LIST(c->zones, e_object_del);
e_comp_canvas_init();
e_comp_canvas_clear();
ecore_evas_free(c->ee);
eina_stringshare_del(c->name);
@ -901,7 +901,7 @@ _e_comp_act_opacity_obj_finder(E_Object *obj)
case E_CLIENT_TYPE:
return ((E_Client*)obj)->frame;
case E_ZONE_TYPE:
case E_MANAGER_TYPE:
case E_COMP_TYPE:
case E_MENU_TYPE:
ec = e_client_focused_get();
return ec ? ec->frame : NULL;
@ -1450,7 +1450,7 @@ e_comp_block_window_add(void)
{
e_comp->block_count++;
if (e_comp->block_win) return;
e_comp->block_win = ecore_x_window_new(e_comp->man->root, e_comp->man->x, e_comp->man->y, e_comp->man->w, e_comp->man->h);
e_comp->block_win = ecore_x_window_new(e_comp->root, e_comp->x, e_comp->y, e_comp->w, e_comp->h);
INF("BLOCK WIN: %x", e_comp->block_win);
ecore_x_window_background_color_set(e_comp->block_win, 0, 0, 0);
e_comp_ignore_win_add(e_comp->block_win);
@ -1474,7 +1474,7 @@ e_comp_block_window_del(void)
EAPI E_Comp *
e_comp_find_by_window(Ecore_Window win)
{
if ((e_comp->win == win) || (e_comp->ee_win == win) || (e_comp->man->root == win)) return e_comp;
if ((e_comp->win == win) || (e_comp->ee_win == win) || (e_comp->root == win)) return e_comp;
return NULL;
}

View File

@ -60,15 +60,16 @@ typedef void (*E_Comp_Grab_Cb)(void);
struct _E_Comp
{
E_Object e_obj_inherit;
int x, y, w, h;
Ecore_Window win; // input overlay
Ecore_Window root;
Ecore_Evas *ee;
Ecore_Window ee_win;
Evas_Object *elm;
Evas *evas;
Evas_Object *bg_blank_object;
Eina_List *zones;
E_Manager *man;
E_Pointer *pointer;
Eina_List *clients;
unsigned int new_clients;
@ -201,8 +202,8 @@ e_comp_util_client_is_fullscreen(const E_Client *ec)
if ((!ec->visible) || (ec->input_only))
return EINA_FALSE;
return ((ec->client.x == 0) && (ec->client.y == 0) &&
((ec->client.w) >= e_comp->man->w) &&
((ec->client.h) >= e_comp->man->h) &&
((ec->client.w) >= e_comp->w) &&
((ec->client.h) >= e_comp->h) &&
(!ec->argb) && (!ec->shaped)
);
}

View File

@ -1,11 +1,13 @@
#include "e.h"
static Eina_List *handlers;
static Ecore_Timer *timer_post_screensaver_lock = NULL;
static void
_e_comp_canvas_cb_del()
{
E_FREE_LIST(handlers, ecore_event_handler_del);
E_FREE_FUNC(timer_post_screensaver_lock, ecore_timer_del);
}
static void
@ -88,6 +90,33 @@ _e_comp_canvas_cb_mouse_wheel(void *d EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Obj
e_bindings_wheel_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(e_comp), event_info);
}
static Eina_Bool
_e_comp_cb_key_down(void *data EINA_UNUSED, int ev_type EINA_UNUSED, Ecore_Event_Key *ev)
{
if (ev->event_window != e_comp->root)
{
E_Client *ec;
ec = e_client_focused_get();
/* *block actions when no client is focused (probably something else did a grab here so we'll play nice)
* *block actions when client menu is up
* *block actions when event (grab) window isn't comp window
* *other cases?
*/
if (!ec) return ECORE_CALLBACK_RENEW;
if ((ec->border_menu) || (ev->event_window != e_comp->ee_win))
return ECORE_CALLBACK_PASS_ON;
}
return !e_bindings_key_down_event_handle(E_BINDING_CONTEXT_MANAGER, E_OBJECT(e_comp), ev);
}
static Eina_Bool
_e_comp_cb_key_up(void *data EINA_UNUSED, int ev_type EINA_UNUSED, Ecore_Event_Key *ev)
{
if (ev->event_window != e_comp->root) return ECORE_CALLBACK_PASS_ON;
return !e_bindings_key_up_event_handle(E_BINDING_CONTEXT_MANAGER, E_OBJECT(e_comp), ev);
}
////////////////////////////////////
static Eina_Bool
@ -108,6 +137,36 @@ _e_comp_canvas_screensaver_active(void *d EINA_UNUSED, Evas_Object *obj EINA_UNU
ecore_evas_manual_render_set(e_comp->ee, EINA_TRUE);
}
static Eina_Bool
_e_comp_cb_timer_post_screensaver_lock(void *data EINA_UNUSED)
{
e_desklock_show_autolocked();
timer_post_screensaver_lock = NULL;
return ECORE_CALLBACK_CANCEL;
}
static Eina_Bool
_e_comp_cb_screensaver_on()
{
if (e_config->desklock_autolock_screensaver)
{
E_FREE_FUNC(timer_post_screensaver_lock, ecore_timer_del);
if (e_config->desklock_post_screensaver_time <= 1.0)
e_desklock_show_autolocked();
else
timer_post_screensaver_lock = ecore_timer_add
(e_config->desklock_post_screensaver_time,
_e_comp_cb_timer_post_screensaver_lock, NULL);
}
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
_e_comp_cb_screensaver_off()
{
E_FREE_FUNC(timer_post_screensaver_lock, ecore_timer_del);
return ECORE_CALLBACK_PASS_ON;
}
////////////////////////////////////
static int
@ -120,12 +179,14 @@ _e_comp_canvas_cb_zone_sort(const void *data1, const void *data2)
EAPI Eina_Bool
e_comp_canvas_init(void)
e_comp_canvas_init(int w, int h)
{
Evas_Object *o;
Eina_List *screens;
e_comp->evas = ecore_evas_get(e_comp->ee);
e_comp->w = w;
e_comp->h = h;
if (e_first_frame)
evas_event_callback_add(e_comp->evas, EVAS_CALLBACK_RENDER_POST, _e_comp_canvas_cb_first_frame, NULL);
@ -133,7 +194,7 @@ e_comp_canvas_init(void)
e_comp->bg_blank_object = o;
evas_object_layer_set(o, E_LAYER_BOTTOM);
evas_object_move(o, 0, 0);
evas_object_resize(o, e_comp->man->w, e_comp->man->h);
evas_object_resize(o, e_comp->w, e_comp->h);
evas_object_color_set(o, 0, 0, 0, 255);
evas_object_name_set(o, "comp->bg_blank_object");
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, (Evas_Object_Event_Cb)_e_comp_canvas_cb_mouse_down, NULL);
@ -163,10 +224,14 @@ e_comp_canvas_init(void)
}
}
else
e_zone_new(0, 0, 0, 0, e_comp->man->w, e_comp->man->h);
e_zone_new(0, 0, 0, 0, e_comp->w, e_comp->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);
E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_KEY_DOWN, _e_comp_cb_key_down, NULL);
E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_KEY_UP, _e_comp_cb_key_up, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_SCREENSAVER_ON, _e_comp_cb_screensaver_on, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_SCREENSAVER_OFF, _e_comp_cb_screensaver_off, NULL);
return EINA_TRUE;
}
@ -186,24 +251,24 @@ e_comp_canvas_clear(void)
//////////////////////////////////////////////
EAPI void
e_comp_canvas_resize(int w, int h)
{
e_comp->w = w;
e_comp->h = h;
ecore_evas_resize(e_comp->ee, w, h);
}
EAPI void
e_comp_all_freeze(void)
{
Eina_List *l;
E_Manager *man;
EINA_LIST_FOREACH(e_manager_list(), l, man)
evas_event_freeze(man->comp->evas);
evas_event_freeze(e_comp->evas);
}
EAPI void
e_comp_all_thaw(void)
{
Eina_List *l;
E_Manager *man;
EINA_LIST_FOREACH(e_manager_list(), l, man)
evas_event_thaw(man->comp->evas);
evas_event_thaw(e_comp->evas);
}
EAPI E_Zone *
@ -412,7 +477,7 @@ e_comp_canvas_update(void)
z = e_comp_zone_number_get(0);
if (z)
{
changed |= e_zone_move_resize(z, 0, 0, e_comp->man->w, e_comp->man->h);
changed |= e_zone_move_resize(z, 0, 0, e_comp->w, e_comp->h);
if (changed) e_shelf_zone_move_resize_handle(z);
}
}
@ -585,3 +650,17 @@ e_comp_canvas_client_layer_map_nearest(int layer)
LAYER_MAP(E_LAYER_CLIENT_DRAG);
return E_LAYER_CLIENT_PRIO;
}
EAPI void
e_comp_canvas_keys_grab(void)
{
if (e_comp->root)
e_bindings_key_grab(E_BINDING_CONTEXT_ANY, e_comp->root);
}
EAPI void
e_comp_canvas_keys_ungrab(void)
{
if (e_comp->root)
e_bindings_key_ungrab(E_BINDING_CONTEXT_ANY, e_comp->root);
}

View File

@ -8,8 +8,9 @@
extern EAPI int E_EVENT_COMPOSITOR_RESIZE;
EAPI Eina_Bool e_comp_canvas_init(void);
EAPI Eina_Bool e_comp_canvas_init(int w, int h);
EINTERN void e_comp_canvas_clear(void);
EAPI void e_comp_canvas_resize(int w, int h);
EAPI void e_comp_all_freeze(void);
EAPI void e_comp_all_thaw(void);
EAPI E_Zone * e_comp_zone_xy_get(Evas_Coord x, Evas_Coord y);
@ -24,7 +25,8 @@ EAPI E_Layer e_comp_canvas_layer_map_to(unsigned int layer);
EAPI unsigned int e_comp_canvas_layer_map(E_Layer layer);
EAPI unsigned int e_comp_canvas_client_layer_map(E_Layer layer);
EAPI E_Layer e_comp_canvas_client_layer_map_nearest(int layer);
EAPI void e_comp_canvas_keys_grab(void);
EAPI void e_comp_canvas_keys_ungrab(void);
/* the following functions are used for adjusting root window coordinates
* to/from canvas coordinates.

View File

@ -2636,7 +2636,7 @@ e_comp_object_util_fullscreen(Evas_Object *obj)
else
{
evas_object_move(obj, 0, 0);
evas_object_resize(obj, e_comp->man->w, e_comp->man->h);
evas_object_resize(obj, e_comp->w, e_comp->h);
}
}
@ -3687,7 +3687,7 @@ _e_comp_object_autoclose_setup(Evas_Object *obj)
/* create rect just below autoclose object to catch mouse events */
e_comp->autoclose.rect = evas_object_rectangle_add(e_comp->evas);
evas_object_move(e_comp->autoclose.rect, 0, 0);
evas_object_resize(e_comp->autoclose.rect, e_comp->man->w, e_comp->man->h);
evas_object_resize(e_comp->autoclose.rect, e_comp->w, e_comp->h);
evas_object_show(e_comp->autoclose.rect);
evas_object_name_set(e_comp->autoclose.rect, "e_comp->autoclose.rect");
evas_object_color_set(e_comp->autoclose.rect, 0, 0, 0, 0);

View File

@ -1515,7 +1515,7 @@ _e_comp_wl_compositor_cb_region_create(struct wl_client *client, struct wl_resou
DBG("Region Create: %d", wl_resource_get_id(resource));
/* try to create new tiler */
if (!(tiler = eina_tiler_new(e_comp->man->w, e_comp->man->h)))
if (!(tiler = eina_tiler_new(e_comp->w, e_comp->h)))
{
ERR("Could not create Eina_Tiler");
wl_resource_post_no_memory(resource);

View File

@ -944,7 +944,7 @@ _e_comp_x_evas_unfullscreen_zoom_cb(void *data EINA_UNUSED, Evas_Object *obj EIN
{
if ((screen_size.width != -1) && (screen_size.height != -1))
{
ecore_x_randr_screen_primary_output_size_set(e_comp->man->root,
ecore_x_randr_screen_primary_output_size_set(e_comp->root,
screen_size_index);
screen_size.width = -1;
screen_size.height = -1;
@ -958,11 +958,11 @@ _e_comp_x_evas_fullscreen_zoom_cb(void *data, Evas_Object *obj EINA_UNUSED, void
Ecore_X_Randr_Screen_Size_MM *sizes;
int num_sizes, i, best_size_index = 0;
ecore_x_randr_screen_primary_output_current_size_get(e_comp->man->root,
ecore_x_randr_screen_primary_output_current_size_get(e_comp->root,
&screen_size.width,
&screen_size.height,
NULL, NULL, NULL);
sizes = ecore_x_randr_screen_primary_output_sizes_get(e_comp->man->root,
sizes = ecore_x_randr_screen_primary_output_sizes_get(e_comp->root,
&num_sizes);
if (sizes)
{
@ -987,7 +987,7 @@ _e_comp_x_evas_fullscreen_zoom_cb(void *data, Evas_Object *obj EINA_UNUSED, void
((best_size.width != screen_size.width) ||
(best_size.height != screen_size.height)))
{
if (ecore_x_randr_screen_primary_output_size_set(e_comp->man->root,
if (ecore_x_randr_screen_primary_output_size_set(e_comp->root,
best_size_index))
screen_size_index = best_size_index;
evas_object_geometry_set(ec->frame, 0, 0, best_size.width, best_size.height);
@ -1109,7 +1109,7 @@ _e_comp_x_show_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Eve
if (e_comp_ignore_win_find(ev->win) ||
(ec && (ec->ignored || ec->override)) ||
(!e_comp_find_by_window(ev->parent)) ||
(ev->parent != e_comp->man->root))
(ev->parent != e_comp->root))
{
ecore_x_window_show(ev->win);
return ECORE_CALLBACK_RENEW;
@ -1220,9 +1220,9 @@ _e_comp_x_show(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Windo
if (e_comp_ignore_win_find(ev->win)) return ECORE_CALLBACK_RENEW;
c = e_comp_find_by_window(ev->event_win);
if (!c) return ECORE_CALLBACK_RENEW;
if (ev->event_win != c->man->root) return ECORE_CALLBACK_RENEW;
if (ev->event_win != e_comp->root) return ECORE_CALLBACK_RENEW;
if ((c->win == ev->win) || (c->ee_win == ev->win) ||
(c->man->root == ev->win) || (c->cm_selection == ev->win)) return ECORE_CALLBACK_RENEW;
(c->root == ev->win) || (c->cm_selection == ev->win)) return ECORE_CALLBACK_RENEW;
/* some window which we haven't made a client for yet but need to */
ec = _e_comp_x_client_new(ev->win, 0);
if (!ec)
@ -1323,7 +1323,7 @@ _e_comp_x_configure(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_
if (e_comp_find_by_window(ev->win))
{
// do not handle this here - use randr events
//e_manager_resize(c->man, ev->w, ev->h);
//e_comp_canvas_resize(ev->w, ev->h);
return ECORE_CALLBACK_RENEW;
}
ec = _e_comp_x_client_find_by_window(ev->win);
@ -1473,13 +1473,13 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore
else
{
/* client is completely outside the screen, policy does not allow */
if (((!E_INTERSECTS(x, y, ec->w, ec->h, e_comp->man->x, e_comp->man->y, e_comp->man->w - 5, e_comp->man->h - 5)) &&
if (((!E_INTERSECTS(x, y, ec->w, ec->h, e_comp->x, e_comp->y, e_comp->w - 5, e_comp->h - 5)) &&
(e_config->screen_limits != E_CLIENT_OFFSCREEN_LIMIT_ALLOW_FULL)) ||
/* client is partly outside the zone, policy does not allow */
(((!E_INSIDE(x, y, e_comp->man->x, e_comp->man->y, e_comp->man->w - 5, e_comp->man->h - 5)) &&
(!E_INSIDE(x + ec->w, y, e_comp->man->x, e_comp->man->y, e_comp->man->w - 5, e_comp->man->h - 5)) &&
(!E_INSIDE(x, y + ec->h, e_comp->man->x, e_comp->man->y, e_comp->man->w - 5, e_comp->man->h - 5)) &&
(!E_INSIDE(x + ec->w, y + ec->h, e_comp->man->x, e_comp->man->y, e_comp->man->w - 5, e_comp->man->h - 5))) &&
(((!E_INSIDE(x, y, e_comp->x, e_comp->y, e_comp->w - 5, e_comp->h - 5)) &&
(!E_INSIDE(x + ec->w, y, e_comp->x, e_comp->y, e_comp->w - 5, e_comp->h - 5)) &&
(!E_INSIDE(x, y + ec->h, e_comp->x, e_comp->y, e_comp->w - 5, e_comp->h - 5)) &&
(!E_INSIDE(x + ec->w, y + ec->h, e_comp->x, e_comp->y, e_comp->w - 5, e_comp->h - 5))) &&
(e_config->screen_limits == E_CLIENT_OFFSCREEN_LIMIT_ALLOW_NONE))
)
e_comp_object_util_center(ec->frame);
@ -1996,7 +1996,7 @@ _e_comp_x_mapping_change(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_E
E_Client *ec;
if (_e_comp_x_mapping_change_disabled) return ECORE_CALLBACK_RENEW;
e_managers_keys_ungrab();
e_comp_canvas_keys_ungrab();
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
Ecore_X_Window win;
@ -2011,7 +2011,7 @@ _e_comp_x_mapping_change(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_E
e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, win);
_e_comp_x_focus_setup(ec);
}
e_managers_keys_grab();
e_comp_canvas_keys_grab();
return ECORE_CALLBACK_PASS_ON;
}
@ -2277,7 +2277,7 @@ _e_comp_x_sync_alarm(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event
evas_object_resize(ec->internal_elm_win, ec->client.w, ec->client.h);
}
ecore_x_pointer_xy_get(e_comp->man->root,
ecore_x_pointer_xy_get(e_comp->root,
&ec->mouse.current.mx,
&ec->mouse.current.my);
@ -2696,10 +2696,10 @@ _e_comp_x_hook_client_pre_frame_assign(void *d EINA_UNUSED, E_Client *ec)
h = MAX(ec->client.h, 1);
/* match ec parent argbness */
if (ec->argb)
pwin = ecore_x_window_manager_argb_new(e_comp->man->root, ec->client.x, ec->client.y, w, h);
pwin = ecore_x_window_manager_argb_new(e_comp->root, ec->client.x, ec->client.y, w, h);
else
{
pwin = ecore_x_window_override_new(e_comp->man->root, ec->client.x, ec->client.y, w, h);
pwin = ecore_x_window_override_new(e_comp->root, ec->client.x, ec->client.y, w, h);
ecore_x_window_shape_events_select(pwin, !ec->internal); //let's just agree never to do this with our own windows...
}
@ -3224,9 +3224,9 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec)
/* some application failing to correctly center a window */
if (eina_list_count(e_comp->zones) > 1)
{
if (abs((e_comp->man->w / 2) - ec->x - (ec->w / 2)) < 3)
if (abs((e_comp->w / 2) - ec->x - (ec->w / 2)) < 3)
ec->x = ((ec->zone->x + ec->zone->w) / 2) - (ec->w / 2);
if (abs((e_comp->man->h / 2) - ec->y - (ec->h / 2)) < 3)
if (abs((e_comp->h / 2) - ec->y - (ec->h / 2)) < 3)
ec->y = ((ec->zone->y + ec->zone->h) / 2) - (ec->h / 2);
}
ec->changes.pos = 1;
@ -4119,7 +4119,7 @@ _e_comp_x_hook_client_redirect(void *d EINA_UNUSED, E_Client *ec)
{
/* first window */
e_comp_x_nocomp_end();
ecore_x_window_reparent(_e_comp_x_client_window_get(ec), e_comp->man->root, ec->client.x, ec->client.y);
ecore_x_window_reparent(_e_comp_x_client_window_get(ec), e_comp->root, ec->client.x, ec->client.y);
_e_comp_x_client_stack(ec);
}
if (!ec->comp_data->damage)
@ -4147,7 +4147,7 @@ _e_comp_x_hook_client_unredirect(void *d EINA_UNUSED, E_Client *ec)
ec->comp_data->unredirected_single = 1;
}
if (!e_comp->nocomp) return; //wait for it...
ecore_x_composite_unredirect_subwindows(e_comp->man->root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
ecore_x_composite_unredirect_subwindows(e_comp->root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
ecore_x_window_hide(e_comp->win);
}
@ -4171,7 +4171,7 @@ _e_comp_x_hook_client_del(void *d EINA_UNUSED, E_Client *ec)
{
if (stopping)
{
ecore_x_window_reparent(win, e_comp->man->root,
ecore_x_window_reparent(win, e_comp->root,
ec->client.x, ec->client.y);
ecore_x_window_configure(win,
ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
@ -4182,7 +4182,7 @@ _e_comp_x_hook_client_del(void *d EINA_UNUSED, E_Client *ec)
else
/* put the window back where we found it to prevent annoying dancing windows */
ecore_x_window_reparent(win, e_comp->man->root,
ecore_x_window_reparent(win, e_comp->root,
ec->comp_data->initial_attributes.x,
ec->comp_data->initial_attributes.y);
if (!ec->internal)
@ -4402,7 +4402,6 @@ _e_comp_x_backlight_notify_cb(void *data EINA_UNUSED, int t EINA_UNUSED, Ecore_X
static Eina_Bool
_e_comp_x_cb_frame_extents_request(void *data EINA_UNUSED, int ev_type EINA_UNUSED, Ecore_X_Event_Frame_Extents_Request *ev)
{
E_Manager *man;
Ecore_X_Window_Type type;
Ecore_X_MWM_Hint_Decor decor;
Ecore_X_Window_State *state;
@ -4413,8 +4412,7 @@ _e_comp_x_cb_frame_extents_request(void *data EINA_UNUSED, int ev_type EINA_UNUS
unsigned int i, num;
win = ecore_x_window_parent_get(ev->win);
man = e_manager_find_by_root(win);
if (!man) return ECORE_CALLBACK_PASS_ON;
if (win != e_comp->root) return ECORE_CALLBACK_PASS_ON;
/* TODO:
* * We need to check if we remember this window, and border locking is set
@ -4495,7 +4493,7 @@ _e_comp_x_cb_frame_extents_request(void *data EINA_UNUSED, int ev_type EINA_UNUS
extents = E_NEW(Frame_Extents, 1);
if (!extents) return ECORE_CALLBACK_RENEW;
o = edje_object_add(man->comp->evas);
o = edje_object_add(e_comp->evas);
snprintf(buf, sizeof(buf), "ev/widgets/border/%s/border", border);
ok = e_theme_edje_object_set(o, "base/theme/borders", buf);
if (ok)
@ -4676,17 +4674,17 @@ _e_comp_x_xinerama_setup(int rw, int rh)
static Eina_Bool
_e_comp_x_randr_change(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *event_info EINA_UNUSED)
{
if ((e_comp->man->w != e_randr2->w) ||
(e_comp->man->h != e_randr2->h))
if ((e_comp->w != e_randr2->w) ||
(e_comp->h != e_randr2->h))
{
e_manager_resize(e_comp->man, e_randr2->w, e_randr2->h);
e_comp_canvas_resize(e_randr2->w, e_randr2->h);
}
else
{
E_Client *ec;
ecore_x_netwm_desk_size_set(e_comp->man->root, e_comp->man->w, e_comp->man->h);
_e_comp_x_xinerama_setup(e_comp->man->w, e_comp->man->h);
ecore_x_netwm_desk_size_set(e_comp->root, e_comp->w, e_comp->h);
_e_comp_x_xinerama_setup(e_comp->w, e_comp->h);
e_comp_canvas_update();
E_CLIENT_FOREACH(ec)
@ -4703,8 +4701,8 @@ _e_comp_x_ee_resize(Ecore_Evas *ee EINA_UNUSED)
{
E_Client *ec;
ecore_x_netwm_desk_size_set(e_comp->man->root, e_comp->man->w, e_comp->man->h);
_e_comp_x_xinerama_setup(e_comp->man->w, e_comp->man->h);
ecore_x_netwm_desk_size_set(e_comp->root, e_comp->w, e_comp->h);
_e_comp_x_xinerama_setup(e_comp->w, e_comp->h);
e_comp_canvas_update();
E_CLIENT_FOREACH(ec)
@ -4719,10 +4717,10 @@ _e_comp_x_del(E_Comp *c)
{
unsigned int i;
ecore_x_window_key_ungrab(c->man->root, "F", ECORE_EVENT_MODIFIER_SHIFT |
ecore_x_window_key_ungrab(c->root, "F", ECORE_EVENT_MODIFIER_SHIFT |
ECORE_EVENT_MODIFIER_CTRL |
ECORE_EVENT_MODIFIER_ALT, 0);
ecore_x_window_key_ungrab(c->man->root, "Home", ECORE_EVENT_MODIFIER_SHIFT |
ecore_x_window_key_ungrab(c->root, "Home", ECORE_EVENT_MODIFIER_SHIFT |
ECORE_EVENT_MODIFIER_CTRL |
ECORE_EVENT_MODIFIER_ALT, 0);
if (c->grabbed)
@ -4735,13 +4733,13 @@ _e_comp_x_del(E_Comp *c)
ecore_x_window_free(c->layers[i].win);
ecore_x_composite_unredirect_subwindows
(c->man->root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
(c->root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
if (c->block_win) ecore_x_window_free(c->block_win);
ecore_x_composite_render_window_disable(c->win);
if (c->man->num == 0) e_alert_composite_win(c->man->root, 0);
e_alert_composite_win(c->root, 0);
ecore_x_window_free(c->cm_selection);
ecore_x_screen_is_composited_set(c->man->num, 0);
ecore_x_screen_is_composited_set(c->num, 0);
eina_list_free(c->x_comp_data->retry_clients);
ecore_timer_del(c->x_comp_data->retry_timer);
@ -4751,7 +4749,6 @@ _e_comp_x_del(E_Comp *c)
static void
_e_comp_x_manage_windows(void)
{
E_Manager *man = e_comp->man;
Ecore_X_Window *windows;
int wnum;
int i;
@ -4767,7 +4764,7 @@ _e_comp_x_manage_windows(void)
/* a manager is designated for each root. lets get all the windows in
the managers root */
windows = ecore_x_window_children_get(man->root, &wnum);
windows = ecore_x_window_children_get(e_comp->root, &wnum);
if (!windows) return;
ecore_x_atoms_get(atom_names, 3, atoms);
@ -4782,7 +4779,7 @@ _e_comp_x_manage_windows(void)
E_Client *ec = NULL;
if ((e_comp->win == windows[i]) || (e_comp->ee_win == windows[i]) ||
(e_comp->man->root == windows[i]) || (e_comp->cm_selection == windows[i]))
(e_comp->root == windows[i]) || (e_comp->cm_selection == windows[i]))
continue;
if (_e_comp_x_client_find_by_window(windows[i]))
continue;
@ -4949,14 +4946,14 @@ _e_comp_x_desklock_show(void)
Ecore_X_Window win;
win = e_comp->x_comp_data->lock_win =
ecore_x_window_input_new(e_comp->man->root, 0, 0, 1, 1);
ecore_x_window_input_new(e_comp->root, 0, 0, 1, 1);
ecore_x_window_show(win);
if (!e_grabinput_get(win, 0, win))
{
Ecore_X_Window *windows;
int wnum, i;
windows = ecore_x_window_children_get(e_comp->man->root, &wnum);
windows = ecore_x_window_children_get(e_comp->root, &wnum);
if (!windows) goto fail;
for (i = 0; i < wnum; i++)
{
@ -5027,7 +5024,7 @@ _e_comp_x_setup(Ecore_X_Window root, int w, int h)
"This is needed for Enlightenment to function."));
return EINA_FALSE;
}
e_comp->man = e_manager_new(root, e_comp, w, h);
e_comp->root = root;
memset((&att), 0, sizeof(Ecore_X_Window_Attributes));
ecore_x_window_attributes_get(e_comp->win, &att);
@ -5120,7 +5117,7 @@ _e_comp_x_setup(Ecore_X_Window root, int w, int h)
e_comp->bindings_grab_cb = _e_comp_x_bindings_grab_cb;
e_comp->bindings_ungrab_cb = _e_comp_x_bindings_ungrab_cb;
if (!e_comp_canvas_init()) return EINA_FALSE;
if (!e_comp_canvas_init(w, h)) return EINA_FALSE;
e_grabinput_focus(e_comp->ee_win, E_FOCUS_METHOD_PASSIVE);
@ -5151,7 +5148,7 @@ _e_comp_x_setup(Ecore_X_Window root, int w, int h)
ecore_x_window_lower(e_comp->layers[i].win);
ecore_evas_lower(e_comp->ee);
e_comp->pointer = e_pointer_window_new(e_comp->man->root, 0);
e_comp->pointer = e_pointer_window_new(e_comp->root, 0);
e_comp->pointer->color = ecore_x_cursor_color_supported_get();
e_pointer_type_push(e_comp->pointer, e_comp->pointer, "default");
_e_comp_x_manage_windows();
@ -5374,6 +5371,6 @@ e_comp_x_nocomp_end(void)
{
e_comp->nocomp = 0;
ecore_x_window_show(e_comp->win);
ecore_x_composite_redirect_subwindows(e_comp->man->root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
ecore_x_composite_redirect_subwindows(e_comp->root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
_e_comp_x_focus_check();
}

View File

@ -908,10 +908,6 @@ static void
_e_desk_window_profile_change_protocol_set(void)
{
#ifndef HAVE_WAYLAND_ONLY
Eina_List *l = NULL;
E_Manager *man;
EINA_LIST_FOREACH(e_manager_list(), l, man)
ecore_x_e_window_profile_supported_set(man->root, e_config->use_desktop_window_profile);
ecore_x_e_window_profile_supported_set(e_comp->root, e_config->use_desktop_window_profile);
#endif
}

View File

@ -268,7 +268,7 @@ e_desklock_show(Eina_Bool suspend)
o = evas_object_rectangle_add(e_comp->evas);
block_rects = eina_list_append(block_rects, o);
evas_object_color_set(o, 0, 0, 0, 255);
evas_object_resize(o, e_comp->man->w, e_comp->man->h);
evas_object_resize(o, e_comp->w, e_comp->h);
evas_object_layer_set(o, E_LAYER_DESKLOCK);
evas_object_show(o);
}

View File

@ -210,7 +210,7 @@ e_drag_new(int x, int y,
ecore_x_window_shadow_tree_flush();
#endif
_drag_win_root = e_comp->man->root;
_drag_win_root = e_comp->root;
drag->cb.key_down = NULL;
drag->cb.key_up = NULL;
@ -275,13 +275,13 @@ e_drag_start(E_Drag *drag, int x, int y)
if (_drag_win) return 0;
#ifndef HAVE_WAYLAND_ONLY
_drag_win = ecore_x_window_input_new(e_comp->win,
e_comp->man->x, e_comp->man->y,
e_comp->man->w, e_comp->man->h);
e_comp->x, e_comp->y,
e_comp->w, e_comp->h);
ecore_event_window_register(_drag_win, e_comp->ee, e_comp->evas,
NULL, NULL, NULL, NULL);
ecore_x_window_show(_drag_win);
#endif
_drag_win_root = e_comp->man->root;
_drag_win_root = e_comp->root;
if (!e_grabinput_get(_drag_win, 1, _drag_win))
{
#ifndef HAVE_WAYLAND_ONLY
@ -341,8 +341,8 @@ e_drag_xdnd_start(E_Drag *drag, int x, int y)
#ifndef HAVE_WAYLAND_ONLY
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return 0;
_drag_win = ecore_x_window_input_new(e_comp->win,
e_comp->man->x, e_comp->man->y,
e_comp->man->w, e_comp->man->h);
e_comp->x, e_comp->y,
e_comp->w, e_comp->h);
ecore_x_window_show(_drag_win);
#endif

View File

@ -3039,18 +3039,17 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
if (e_config->device_auto_open && !eina_list_count(v->mounts))
{
E_Action *a;
Eina_List *m;
unsigned int count;
a = e_action_find("fileman");
m = e_manager_list();
count = eina_list_count(_e_fm2_list);
if (a && a->func.go && m && eina_list_data_get(m) && mountpoint)
if (a && a->func.go && mountpoint)
{
Evas_Object *fm;
Eina_List *m;
Eina_Bool auto_unmount = v->auto_unmount;
a->func.go(E_OBJECT(eina_list_data_get(m)), mountpoint);
a->func.go(E_OBJECT(e_comp), mountpoint);
if (count == eina_list_count(_e_fm2_list)) break;
EINA_LIST_REVERSE_FOREACH(_e_fm2_list, m, fm)
{

View File

@ -130,7 +130,7 @@ e_grab_dialog_show(Evas_Object *parent, Eina_Bool is_mouse, Ecore_Event_Handler_
evas_object_event_callback_add(eg->dia->win, EVAS_CALLBACK_DEL, _e_grab_dialog_delete, eg);
#ifndef HAVE_WAYLAND_ONLY
eg->grab_win = ecore_x_window_input_new(e_comp->man->root, 0, 0, 1, 1);
eg->grab_win = ecore_x_window_input_new(e_comp->root, 0, 0, 1, 1);
ecore_x_window_show(eg->grab_win);
e_grabinput_get(eg->grab_win, 0, eg->grab_win);
#endif

View File

@ -299,31 +299,25 @@ e_hints_client_list_set(void)
{
#ifdef HAVE_WAYLAND_ONLY
#else
E_Manager *man;
const Eina_List *l;
/* Get client count by adding client lists on all containers */
EINA_LIST_FOREACH(e_manager_list(), l, man)
{
unsigned int i = 0;
Ecore_X_Window *clients = NULL;
if (man->comp->comp_type != E_PIXMAP_TYPE_X) continue;
if (man->comp->clients)
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return;
if (e_comp->clients)
{
E_Client *ec;
const Eina_List *ll;
clients = calloc(e_clients_count(), sizeof(Ecore_X_Window));
EINA_LIST_FOREACH(man->comp->clients, ll, ec)
EINA_LIST_FOREACH(e_comp->clients, ll, ec)
{
if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_X) continue;
clients[i++] = e_client_util_win_get(ec);
}
}
ecore_x_netwm_client_list_set(man->root, clients, i);
ecore_x_netwm_client_list_set(e_comp->root, clients, i);
free(clients);
}
#endif
}
@ -383,25 +377,22 @@ e_hints_client_stacking_set(void)
* to be returned in the list
*/
if (i <= c)
ecore_x_netwm_client_list_stacking_set(e_comp->man->root, clients, c);
ecore_x_netwm_client_list_stacking_set(e_comp->root, clients, c);
free(clients);
#endif
}
EAPI void
e_hints_active_window_set(E_Manager *man,
E_Client *ec)
e_hints_active_window_set(E_Client *ec)
{
#ifdef HAVE_WAYLAND_ONLY
(void)man;
(void)ec;
#else
E_OBJECT_CHECK(man);
if (e_comp->comp_type != E_PIXMAP_TYPE_X) return;
if (ec && (e_pixmap_type_get(ec->pixmap) == E_PIXMAP_TYPE_X))
ecore_x_netwm_client_active_set(man->root, e_client_util_win_get(ec));
ecore_x_netwm_client_active_set(e_comp->root, e_client_util_win_get(ec));
else
ecore_x_netwm_client_active_set(man->root, 0);
ecore_x_netwm_client_active_set(e_comp->root, 0);
#endif
}
@ -1674,8 +1665,8 @@ e_hints_scale_update(void)
#else
unsigned int scale = e_scale * 1000;
if (e_comp->man->root)
ecore_x_window_prop_card32_set(e_comp->man->root, ATM_ENLIGHTENMENT_SCALE, &scale, 1);
if (e_comp->root)
ecore_x_window_prop_card32_set(e_comp->root, ATM_ENLIGHTENMENT_SCALE, &scale, 1);
#endif
}

View File

@ -4,11 +4,11 @@
#define E_HINTS_H
EINTERN void e_hints_init(Ecore_Window win, Ecore_Window propwin);
EINTERN void e_hints_manager_init(E_Manager *man);
//EINTERN void e_hints_manager_init(E_Manager *man);
EAPI void e_hints_client_list_set(void);
EAPI void e_hints_client_stacking_set(void);
EAPI void e_hints_active_window_set(E_Manager *man, E_Client *ec);
EAPI void e_hints_active_window_set(E_Client *ec);
EINTERN void e_hints_window_init(E_Client *ec);
EAPI void e_hints_window_state_set(E_Client *ec);

View File

@ -1,7 +1,6 @@
#include "e_mmx.h"
#include "e_object.h"
#include "e_user.h"
#include "e_manager.h"
#include "e_path.h"
#include "e_ipc.h"
#include "e_error.h"

View File

@ -969,7 +969,7 @@ _e_client_menu_cb_align_setup(E_Client *ec, Evas_Object_Event_Cb cb)
e_notification_client_send(&n, NULL, NULL);
o = evas_object_rectangle_add(e_comp->evas);
evas_object_resize(o, e_comp->man->w, e_comp->man->h);
evas_object_resize(o, e_comp->w, e_comp->h);
evas_object_color_set(o, 0, 0, 0, 0);
evas_object_layer_set(o, E_LAYER_POPUP);
evas_object_show(o);

View File

@ -190,25 +190,16 @@ _e_ipc_cb_client_data(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
if (e_ipc_codec_2str_dec(e->data, e->size, &req))
{
Eina_List *m = e_manager_list();
int len, ok = 0;
void *d;
if (m)
{
E_Manager *man = eina_list_data_get(m);
if (man)
{
E_Action *act = e_action_find(req->str1);
if ((act) && (act->func.go))
{
act->func.go(E_OBJECT(man), req->str2);
act->func.go(E_OBJECT(e_comp), req->str2);
ok = 1;
}
}
}
d = e_ipc_codec_int_enc(ok, &len);
if (d)

View File

@ -992,9 +992,9 @@ main(int argc, char **argv)
_idle_flush = ecore_idle_enterer_add(_e_main_cb_x_flusher, NULL);
TS("Add Idler For X Flush Done");
TS("E_Manager Keys Grab");
e_managers_keys_grab();
TS("E_Manager Keys Grab Done");
TS("E_Comp_Canvas Keys Grab");
e_comp_canvas_keys_grab();
TS("E_Comp_Canvas Keys Grab Done");
if (e_config->show_splash)
e_init_status_set(_("Load Modules"));
@ -1564,9 +1564,6 @@ _e_main_test_formats(void)
static int
_e_main_screens_init(void)
{
TS("\tscreens: manager");
if (!e_manager_init()) return 0;
TS("\tscreens: client");
if (!e_client_init()) return 0;
TS("\tscreens: win");
@ -1620,7 +1617,6 @@ _e_main_screens_shutdown(void)
e_desk_shutdown();
e_zone_shutdown();
e_manager_shutdown();
return 1;
}

View File

@ -1,204 +0,0 @@
#include "e.h"
EAPI int E_EVENT_MANAGER_KEYS_GRAB = -1;
static Eina_List *managers = NULL;
static Ecore_Timer *timer_post_screensaver_lock = NULL;
static void
_e_manager_free(E_Manager *man)
{
E_FREE_LIST(man->handlers, ecore_event_handler_del);
managers = eina_list_remove(managers, man);
free(man);
}
static Eina_Bool
_e_manager_cb_key_down(void *data, int ev_type EINA_UNUSED, Ecore_Event_Key *ev)
{
E_Manager *man = data;
if (ev->event_window != man->root)
{
E_Client *ec;
ec = e_client_focused_get();
/* *block actions when no client is focused (probably something else did a grab here so we'll play nice)
* *block actions when client menu is up
* *block actions when event (grab) window isn't comp window
* *other cases?
*/
if (!ec) return ECORE_CALLBACK_RENEW;
if ((ec->border_menu) || (ev->event_window != man->comp->ee_win))
return ECORE_CALLBACK_PASS_ON;
}
if (ev->root_window != man->root) man = e_manager_find_by_root(ev->root_window);
if (!man) man = eina_list_data_get(managers);
return !e_bindings_key_down_event_handle(E_BINDING_CONTEXT_MANAGER, E_OBJECT(man), ev);
}
static Eina_Bool
_e_manager_cb_key_up(void *data, int ev_type EINA_UNUSED, Ecore_Event_Key *ev)
{
E_Manager *man = data;
if (ev->event_window != man->root) return ECORE_CALLBACK_PASS_ON;
if (ev->root_window != man->root) man = e_manager_find_by_root(ev->root_window);
if (!man) man = eina_list_data_get(managers);
return !e_bindings_key_up_event_handle(E_BINDING_CONTEXT_MANAGER, E_OBJECT(man), ev);
}
static Eina_Bool
_e_manager_cb_timer_post_screensaver_lock(void *data EINA_UNUSED)
{
e_desklock_show_autolocked();
timer_post_screensaver_lock = NULL;
return ECORE_CALLBACK_CANCEL;
}
static Eina_Bool
_e_manager_cb_screensaver_on(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *ev EINA_UNUSED)
{
if (e_config->desklock_autolock_screensaver)
{
E_FREE_FUNC(timer_post_screensaver_lock, ecore_timer_del);
if (e_config->desklock_post_screensaver_time <= 1.0)
e_desklock_show_autolocked();
else
timer_post_screensaver_lock = ecore_timer_add
(e_config->desklock_post_screensaver_time,
_e_manager_cb_timer_post_screensaver_lock, NULL);
}
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
_e_manager_cb_screensaver_off(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *ev EINA_UNUSED)
{
E_FREE_FUNC(timer_post_screensaver_lock, ecore_timer_del);
return ECORE_CALLBACK_PASS_ON;
}
/* externally accessible functions */
EINTERN int
e_manager_init(void)
{
E_EVENT_MANAGER_KEYS_GRAB = ecore_event_type_new();
return 1;
}
EINTERN int
e_manager_shutdown(void)
{
E_FREE_LIST(managers, e_object_del);
E_FREE_FUNC(timer_post_screensaver_lock, ecore_timer_del);
return 1;
}
EAPI Eina_List *
e_manager_list(void)
{
return managers;
}
EAPI E_Manager *
e_manager_new(Ecore_Window root, E_Comp *c, int w, int h)
{
E_Manager *man;
man = E_OBJECT_ALLOC(E_Manager, E_MANAGER_TYPE, _e_manager_free);
if (!man) return NULL;
man->root = root;
man->num = c->num;
man->w = w;
man->h = h;
man->comp = c;
managers = eina_list_append(managers, man);
E_LIST_HANDLER_APPEND(man->handlers, ECORE_EVENT_KEY_DOWN,
_e_manager_cb_key_down, man);
E_LIST_HANDLER_APPEND(man->handlers, ECORE_EVENT_KEY_UP,
_e_manager_cb_key_up, man);
E_LIST_HANDLER_APPEND(man->handlers, E_EVENT_SCREENSAVER_ON,
_e_manager_cb_screensaver_on, man);
E_LIST_HANDLER_APPEND(man->handlers, E_EVENT_SCREENSAVER_OFF,
_e_manager_cb_screensaver_off, man);
return man;
}
EAPI void
e_manager_resize(E_Manager *man, int w, int h)
{
E_OBJECT_CHECK(man);
E_OBJECT_TYPE_CHECK(man, E_MANAGER_TYPE);
man->w = w;
man->h = h;
ecore_evas_resize(man->comp->ee, w, h);
}
EAPI E_Manager *
e_manager_current_get(void)
{
Eina_List *l;
E_Manager *man;
int x, y;
if (!managers) return NULL;
if (eina_list_count(managers) == 1)
return eina_list_data_get(managers);
EINA_LIST_FOREACH(managers, l, man)
{
ecore_evas_pointer_xy_get(man->comp->ee, &x, &y);
if (x == -1 && y == -1)
continue;
if (E_INSIDE(x, y, man->x, man->y, man->w, man->h))
return man;
}
return eina_list_data_get(managers);
}
EAPI E_Manager *
e_manager_number_get(int num)
{
Eina_List *l;
E_Manager *man;
if (!managers) return NULL;
EINA_LIST_FOREACH(managers, l, man)
{
if (man->num == num)
return man;
}
return NULL;
}
EAPI void
e_managers_keys_grab(void)
{
Eina_List *l;
E_Manager *man;
EINA_LIST_FOREACH(managers, l, man)
{
if (man->root)
e_bindings_key_grab(E_BINDING_CONTEXT_ANY, man->root);
}
ecore_event_add(E_EVENT_MANAGER_KEYS_GRAB, NULL, NULL, NULL);
}
EAPI void
e_managers_keys_ungrab(void)
{
Eina_List *l;
E_Manager *man;
EINA_LIST_FOREACH(managers, l, man)
{
if (man->root)
e_bindings_key_ungrab(E_BINDING_CONTEXT_ANY, man->root);
}
}

View File

@ -1,52 +0,0 @@
#ifdef E_TYPEDEFS
typedef struct _E_Manager E_Manager;
#else
#ifndef E_MANAGER_H
#define E_MANAGER_H
#define E_MANAGER_TYPE (int) 0xE0b01008
extern EAPI int E_EVENT_MANAGER_KEYS_GRAB;
struct _E_Manager
{
E_Object e_obj_inherit;
int num;
int x, y, w, h;
Ecore_Window root;
Eina_List *handlers;
E_Comp *comp;
Eina_Bool visible : 1;
};
EINTERN int e_manager_init(void);
EINTERN int e_manager_shutdown(void);
EAPI Eina_List *e_manager_list(void);
EAPI E_Manager *e_manager_new(Ecore_Window root, E_Comp *c, int w, int h);
EAPI void e_manager_manage_windows(E_Manager *man);
EAPI void e_manager_resize(E_Manager *man, int w, int h);
EAPI E_Manager *e_manager_current_get(void);
EAPI E_Manager *e_manager_number_get(int num);
EAPI void e_managers_keys_grab(void);
EAPI void e_managers_keys_ungrab(void);
static inline E_Manager *
e_manager_find_by_root(Ecore_Window root)
{
Eina_List *l;
E_Manager *man;
EINA_LIST_FOREACH(e_manager_list(), l, man)
if (root == man->root) return man;
return NULL;
}
#endif
#endif

View File

@ -164,7 +164,7 @@ _e_sys_comp_logout(void)
static void
_e_sys_comp_resume(void)
{
evas_damage_rectangle_add(e_comp->evas, 0, 0, e_comp->man->w, e_comp->man->h);
evas_damage_rectangle_add(e_comp->evas, 0, 0, e_comp->w, e_comp->h);
_e_sys_comp_emit_cb_wait(E_SYS_SUSPEND, "e,state,sys,resume", NULL, EINA_FALSE);
e_screensaver_deactivate();
}

View File

@ -42,8 +42,6 @@ static int
_e_test_timer(void *data)
{
E_Menu *m;
Eina_List *managers, *l;
E_Manager *man;
m = data;
if (m)
@ -53,18 +51,13 @@ _e_test_timer(void *data)
ecore_timer_add(0.05, _e_test_timer, NULL);
return 0;
}
managers = e_manager_list();
EINA_LIST_FOREACH(managers, l, man)
{
m = e_int_menus_main_new();
e_menu_activate_mouse(m,
eina_list_data_get(man->comp->zones),
eina_list_data_get(e_comp->zones),
0, 0, 1, 1, E_MENU_POP_DIRECTION_DOWN, 0);
ecore_timer_add(0.05, _e_test_timer, m);
return 0;
}
return 0;
}
static void
_e_test_internal(void)
@ -133,18 +126,13 @@ static void
_e_test_internal(void)
{
E_Menu *m;
Eina_List *l;
E_Manager *man;
EINA_LIST_FOREACH(e_manager_list(), l, man)
{
m = e_int_menus_main_new();
e_menu_activate_mouse(m,
eina_list_data_get(man->comp->zones),
eina_list_data_get(e_comp->zones),
0, 0, 1, 1, E_MENU_POP_DIRECTION_DOWN, 0);
ecore_timer_add(0.02, _e_test_timer, m);
}
}
#elif 0
static void

View File

@ -23,7 +23,6 @@ typedef struct _Setting Setting;
struct _Settings_Manager
{
E_Manager *man;
Ecore_X_Window selection;
Ecore_Timer *timer_retry;
unsigned long serial;
@ -60,7 +59,7 @@ static Ecore_X_Atom _atom_manager = 0;
static Ecore_X_Atom _atom_xsettings = 0;
static Ecore_X_Atom _atom_gtk_iconthemes = 0;
static Ecore_X_Atom _atom_gtk_rcfiles = 0;
static Eina_List *managers = NULL;
static Settings_Manager *manager = NULL;
static Eina_List *settings = NULL;
static Eina_Bool running = EINA_FALSE;
static Eio_File *eio_op = NULL;
@ -84,22 +83,22 @@ _e_xsettings_atom_screen_get(int screen_num)
}
static Eina_Bool
_e_xsettings_selection_owner_set(Settings_Manager *sm)
_e_xsettings_selection_owner_set(void)
{
Ecore_X_Atom atom;
Ecore_X_Window cur_selection;
Eina_Bool ret;
atom = _e_xsettings_atom_screen_get(sm->man->num);
ecore_x_selection_owner_set(sm->man->comp->cm_selection, atom,
atom = _e_xsettings_atom_screen_get(0);
ecore_x_selection_owner_set(e_comp->cm_selection, atom,
ecore_x_current_time_get());
ecore_x_sync();
cur_selection = ecore_x_selection_owner_get(atom);
ret = (cur_selection == sm->man->comp->cm_selection);
ret = (cur_selection == e_comp->cm_selection);
if (!ret)
ERR("XSETTINGS: tried to set selection to %#x, but got %#x",
(unsigned int)sm->man->comp->cm_selection, cur_selection);
(unsigned int)e_comp->cm_selection, cur_selection);
return ret;
}
@ -109,7 +108,7 @@ _e_xsettings_deactivate(Settings_Manager *sm)
{
Ecore_X_Atom atom;
atom = _e_xsettings_atom_screen_get(sm->man->num);
atom = _e_xsettings_atom_screen_get(0);
ecore_x_selection_owner_set(0, atom, ecore_x_current_time_get());
ecore_x_sync();
sm->enabled = 0;
@ -123,17 +122,17 @@ _e_xsettings_activate(Settings_Manager *sm)
if (sm->enabled) return 1;
atom = _e_xsettings_atom_screen_get(sm->man->num);
atom = _e_xsettings_atom_screen_get(0);
old_win = ecore_x_selection_owner_get(atom);
if (old_win != 0) return 0;
if (!_e_xsettings_selection_owner_set(sm))
if (!_e_xsettings_selection_owner_set())
return 0;
ecore_x_client_message32_send(sm->man->root, _atom_manager,
ecore_x_client_message32_send(e_comp->root, _atom_manager,
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
ecore_x_current_time_get(), atom,
sm->man->comp->cm_selection, 0, 0);
e_comp->cm_selection, 0, 0);
if (settings) _e_xsettings_apply(sm);
sm->enabled = 1;
@ -353,7 +352,7 @@ _e_xsettings_apply(Settings_Manager *sm)
EINA_LIST_FOREACH(settings, l, s)
pos = _e_xsettings_copy(pos, s);
ecore_x_window_prop_property_set(sm->man->comp->cm_selection,
ecore_x_window_prop_property_set(e_comp->cm_selection,
_atom_xsettings,
_atom_xsettings,
8, data, len);
@ -363,11 +362,7 @@ _e_xsettings_apply(Settings_Manager *sm)
static void
_e_xsettings_update(void)
{
Settings_Manager *sm;
Eina_List *l;
EINA_LIST_FOREACH(managers, l, sm)
if (sm->man->comp->cm_selection) _e_xsettings_apply(sm);
if (e_comp->cm_selection) _e_xsettings_apply(manager);
}
static void
@ -585,9 +580,6 @@ _e_xsettings_cursor_path_set(void)
static void
_e_xsettings_start(void)
{
Eina_List *l;
E_Manager *man;
if (running) return;
_e_xsettings_theme_set();
@ -595,16 +587,10 @@ _e_xsettings_start(void)
_e_xsettings_font_set();
_e_xsettings_cursor_path_set();
EINA_LIST_FOREACH(e_manager_list(), l, man)
{
Settings_Manager *sm = E_NEW(Settings_Manager, 1);
sm->man = man;
manager = E_NEW(Settings_Manager, 1);
if (!_e_xsettings_activate(sm))
_e_xsettings_retry(sm);
managers = eina_list_append(managers, sm);
}
if (!_e_xsettings_activate(manager))
_e_xsettings_retry(manager);
running = EINA_TRUE;
}
@ -612,21 +598,17 @@ _e_xsettings_start(void)
static void
_e_xsettings_stop(void)
{
Settings_Manager *sm;
Setting *s;
if (!running) return;
EINA_LIST_FREE(managers, sm)
{
if (sm->timer_retry)
ecore_timer_del(sm->timer_retry);
if (manager->timer_retry)
ecore_timer_del(manager->timer_retry);
if (!stopping)
_e_xsettings_deactivate(sm);
_e_xsettings_deactivate(manager);
E_FREE(sm);
}
E_FREE(manager);
EINA_LIST_FREE(settings, s)
{

View File

@ -88,7 +88,7 @@ _mouse_in_win_get(Cover *cov, int x, int y)
then previous target window which has the highlight object
should get the message. how? */
target_win = ecore_x_window_shadow_tree_at_xy_with_skip_get
(cov->e_comp->man->root, x, y, skip, i);
(cov->e_comp->root, x, y, skip, i);
}
static unsigned int
@ -756,7 +756,7 @@ _cover_new(E_Zone *zone)
evas_object_show(cov->text);
#else
cov->win = ecore_x_window_input_new(e_comp->manager->root,
cov->win = ecore_x_window_input_new(e_compager->root,
e_comp->x + zone->x,
e_comp->y + zone->y,
zone->w, zone->h);

View File

@ -370,9 +370,7 @@ _e_mod_action_conf_cb(E_Object *obj, const char *params)
if (obj)
{
if (obj->type == E_MANAGER_TYPE)
zone = e_zone_current_get();
else if (obj->type == E_COMP_TYPE)
if (obj->type == E_COMP_TYPE)
zone = e_zone_current_get();
else if (obj->type == E_ZONE_TYPE)
zone = ((E_Zone *)obj);

View File

@ -527,10 +527,7 @@ _cb_add_binding(void *data,
elm_win_borderless_set(grab_dlg->win, EINA_TRUE);
#ifndef HAVE_WAYLAND_ONLY
E_Manager *man;
man = e_manager_current_get();
grab_win = ecore_x_window_input_new(man->root, 0, 0, 1, 1);
grab_win = ecore_x_window_input_new(e_comp->root, 0, 0, 1, 1);
ecore_x_window_show(grab_win);
e_grabinput_get(grab_win, 0, grab_win);
#endif

View File

@ -186,7 +186,7 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED,
_auto_apply_changes(cfdata);
e_managers_keys_ungrab();
e_comp_canvas_keys_ungrab();
EINA_LIST_FREE(e_bindings->key_bindings, bi)
{
e_bindings_key_del(bi->context, bi->key, bi->modifiers, bi->any_mod,
@ -215,7 +215,7 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED,
e_bindings_key_add(bi->context, bi->key, bi->modifiers, bi->any_mod,
bi->action, bi->params);
}
e_managers_keys_grab();
e_comp_canvas_keys_grab();
e_config_save_queue();
return 1;

View File

@ -205,7 +205,7 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata
_auto_apply_changes(cfdata);
e_comp_button_bindings_ungrab_all();
e_managers_keys_ungrab();
e_comp_canvas_keys_ungrab();
EINA_LIST_FREE(e_bindings->mouse_bindings, eb)
{
@ -269,7 +269,7 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata
bw2->any_mod, bw2->action, bw2->params);
}
e_comp_button_bindings_grab_all();
e_managers_keys_grab();
e_comp_canvas_keys_grab();
e_config_save_queue();
return 1;

View File

@ -57,9 +57,6 @@ struct _E_Smart_Data
Evas_Coord vw, vh;
} grid;
/* manager number */
unsigned int man_num;
/* zone number */
unsigned int zone_num;
@ -320,7 +317,6 @@ void
e_smart_monitor_background_set(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy)
{
E_Smart_Data *sd;
E_Manager *man;
E_Zone *zone;
E_Desk *desk;
@ -329,10 +325,6 @@ e_smart_monitor_background_set(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy)
/* try to get the objects smart data */
if (!(sd = evas_object_smart_data_get(obj))) return;
/* get the current manager */
man = e_manager_current_get();
sd->man_num = man->num;
/* get the zone number */
if (!(zone = e_comp_zone_xy_get(dx, dy)))
zone = e_zone_current_get();
@ -910,9 +902,8 @@ _e_smart_monitor_background_update(void *data, int type EINA_UNUSED, void *event
ev = event;
/* check this bg event happened on our manager */
if (((ev->manager < 0) || (ev->manager == (int)sd->man_num)) &&
((ev->zone < 0) || (ev->zone == (int)sd->zone_num)))
/* check this bg event happened on our zone */
if ((ev->zone < 0) || (ev->zone == (int)sd->zone_num))
{
/* check this bg event happened on our desktop */
if (((ev->desk_x < 0) || (ev->desk_x == sd->current.x)) &&

View File

@ -1113,7 +1113,6 @@ static int
_open_folder_action(Evry_Action *act)
{
E_Action *action;
Eina_List *m;
char *dir;
if (!(action = e_action_find("fileman")))
@ -1124,18 +1123,16 @@ _open_folder_action(Evry_Action *act)
if (!(evry->file_path_get(file)))
return 0;
m = e_manager_list();
if (!IS_BROWSEABLE(file))
{
dir = ecore_file_dir_get(file->path);
if (!dir) return 0;
action->func.go(E_OBJECT(m->data), dir);
action->func.go(E_OBJECT(e_comp), dir);
free(dir);
}
else
{
action->func.go(E_OBJECT(m->data), file->path);
action->func.go(E_OBJECT(e_comp), file->path);
}
return 1;

View File

@ -113,8 +113,8 @@ gadman_init(E_Module *m)
Man->module = m;
gadman_locked = e_module_loading_get();
Man->comp = e_comp;
Man->width = Man->comp->man->w;
Man->height = Man->comp->man->h;
Man->width = e_comp->w;
Man->height = e_comp->h;
/* create and register "desktop" location */
location = Man->location[GADMAN_LAYER_BG] = e_gadcon_location_new(_("Desktop"), E_GADCON_SITE_DESKTOP,
@ -649,8 +649,7 @@ gadman_update_bg(void)
//THIS IS FOR A NORMAL IMAGE
obj = evas_object_image_add(Man->comp->evas);
evas_object_image_file_set(obj, Man->conf->custom_bg, NULL);
evas_object_image_fill_set(obj, 0, 0, Man->comp->man->w,
Man->comp->man->h);
evas_object_image_fill_set(obj, 0, 0, e_comp->w, e_comp->h);
}
edje_object_part_swallow(Man->full_bg, "e.swallow.bg", obj);
break;
@ -798,7 +797,7 @@ _gadman_overlay_create(void)
/* create full background object */
Man->full_bg = edje_object_add(Man->comp->evas);
evas_object_geometry_set(Man->full_bg, 0, 0, Man->comp->man->w, Man->comp->man->h);
evas_object_geometry_set(Man->full_bg, 0, 0, e_comp->w, e_comp->h);
e_theme_edje_object_set(Man->full_bg, "base/theme/gadman",
"e/gadman/full_bg");
edje_object_signal_callback_add(Man->full_bg, "mouse,down,*",

View File

@ -1869,7 +1869,7 @@ _ibar_cb_icon_move(void *data, Evas *e, Evas_Object *obj, void *event_info EINA_
if (x < 1)
zone = e_comp_zone_xy_get(0, y);
else
zone = e_comp_zone_xy_get(e_comp->man->w - 5, y);
zone = e_comp_zone_xy_get(e_comp->w - 5, y);
if (!zone)
zone = eina_list_data_get(e_comp->zones);
}
@ -2519,12 +2519,9 @@ _ibar_focus_cb_key_down(void *data EINA_UNUSED, int type EINA_UNUSED, void *even
static void
_ibar_go_focus(void)
{
E_Manager *man;
IBar *b;
if (_ibar_focus_win) return;
man = e_manager_current_get();
if (!man) return;
_ibar_focus_win = e_comp->ee_win;
if (!e_grabinput_get(0, 0, _ibar_focus_win))
{

View File

@ -1348,8 +1348,8 @@ _mixer_actions_register(E_Mixer_Module_Context *ctxt)
ctxt->actions.mute->func.go = _mixer_cb_volume_mute;
e_action_predef_name_set(_e_mixer_Name, _lbl_mute, _act_mute,
NULL, NULL, 0);
e_managers_keys_ungrab();
e_managers_keys_grab();
e_comp_canvas_keys_ungrab();
e_comp_canvas_keys_grab();
}
}
}
@ -1375,8 +1375,8 @@ _mixer_actions_unregister(E_Mixer_Module_Context *ctxt)
{
e_action_predef_name_del(_e_mixer_Name, _lbl_mute);
e_action_del(_act_mute);
e_managers_keys_ungrab();
e_managers_keys_grab();
e_comp_canvas_keys_ungrab();
e_comp_canvas_keys_grab();
ctxt->actions.mute = NULL;
}
}

View File

@ -703,10 +703,10 @@ _grab_key_down_cb(void *data, int type EINA_UNUSED, void *event)
bi->action = eina_stringshare_ref(_act_toggle);
bi->params = eina_stringshare_ref(entry->id);
e_managers_keys_ungrab();
e_comp_canvas_keys_ungrab();
e_bindings->key_bindings = eina_list_append(e_bindings->key_bindings, bi);
e_bindings_key_add(bi->context, bi->key, bi->modifiers, bi->any_mod, bi->action, bi->params);
e_managers_keys_grab();
e_comp_canvas_keys_grab();
e_config_save_queue();
e_object_del(E_OBJECT(eg));
return ECORE_CALLBACK_RENEW;

View File

@ -19,7 +19,6 @@ static Evas_Object *win = NULL;
E_Confirm_Dialog *cd = NULL;
static Evas_Object *o_bg = NULL, *o_box = NULL, *o_content = NULL;
static Evas_Object *o_event = NULL, *o_img = NULL, *o_hlist = NULL;
static E_Manager *sman = NULL;
static int quality = 90;
static int screen = -1;
#define MAXZONES 64
@ -599,10 +598,9 @@ _shot_now(E_Zone *zone, E_Client *ec, const char *params)
if ((!zone) && (!ec)) return;
if (zone)
{
sman = e_comp->man;
xwin = sman->root;
w = sw = sman->w;
h = sh = sman->h;
xwin = e_comp->root;
w = sw = e_comp->w;
h = sh = e_comp->h;
x = y = 0;
if (!ecore_x_window_attributes_get(xwin, &watt)) return;
visual = watt.visual;
@ -935,9 +933,7 @@ _e_mod_action_cb(E_Object *obj, const char *params)
if (obj)
{
if (obj->type == E_MANAGER_TYPE)
zone = e_zone_current_get();
else if (obj->type == E_COMP_TYPE)
if (obj->type == E_COMP_TYPE)
zone = e_zone_current_get();
else if (obj->type == E_ZONE_TYPE)
zone = ((E_Zone *)obj);

View File

@ -511,7 +511,7 @@ Ecore_X_Window
systray_root_get(const Instance *inst)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(inst, 0);
return inst->comp->man->root;
return e_comp->root;
}
static void

View File

@ -106,7 +106,7 @@ e_winlist_show(E_Zone *zone, E_Winlist_Filter filter)
#ifndef HAVE_WAYLAND_ONLY
if (e_comp->comp_type == E_PIXMAP_TYPE_X)
{
_input_window = ecore_x_window_input_new(e_comp->man->root, 0, 0, 1, 1);
_input_window = ecore_x_window_input_new(e_comp->root, 0, 0, 1, 1);
ecore_x_window_show(_input_window);
if (!e_grabinput_get(_input_window, 0, _input_window))
{

View File

@ -133,8 +133,8 @@ e_modapi_init(E_Module *m)
e_xinerama_screens_set(eina_list_append(NULL, screen));
}
comp->man = e_manager_new(ecore_evas_window_get(comp->ee), comp, w, h);
if (!e_comp_canvas_init()) return NULL;
comp->root = ecore_evas_window_get(comp->ee);
if (!e_comp_canvas_init(w, h)) return NULL;
e_comp_canvas_fake_layers_init();
/* NB: This needs to be called AFTER the comp canvas has been setup */

View File

@ -42,9 +42,9 @@ e_modapi_init(E_Module *m)
screen->h = h;
e_xinerama_screens_set(eina_list_append(NULL, screen));
}
comp->man = e_manager_new(ecore_evas_window_get(comp->ee), comp, w, h);
comp->root = ecore_evas_window_get(comp->ee);
e_comp_canvas_init(w, h);
e_comp_wl_init();
e_comp_canvas_init();
e_comp_canvas_fake_layers_init();
comp->pointer = e_pointer_canvas_new(comp->ee, EINA_TRUE);

View File

@ -89,7 +89,6 @@ e_modapi_init(E_Module *m)
}
ecore_evas_screen_geometry_get(comp->ee, NULL, NULL, &w, &h);
ecore_evas_resize(comp->ee, w, h);
if (!e_xinerama_fake_screens_exist())
{
@ -102,8 +101,8 @@ e_modapi_init(E_Module *m)
e_xinerama_screens_set(eina_list_append(NULL, screen));
}
comp->man = e_manager_new(ecore_evas_window_get(comp->ee), comp, w, h);
if (!e_comp_canvas_init()) return NULL;
comp->root = ecore_evas_window_get(comp->ee);
if (!e_comp_canvas_init(w, h)) return NULL;
e_comp_canvas_fake_layers_init();
/* NB: This needs to be called AFTER comp_canvas has been setup as it