summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-03-19 16:03:51 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-03-19 16:53:32 -0400
commit58447e95081cad3e1885df585bcdf7771f8393b4 (patch)
tree7b8085bcda41dda6e6c8fc69263a8bc07adf138f
parentdbcd03044e2e305369e7d538aa6e1071da5aadab (diff)
completely remove E_Manager
the final step in flattening all the canvas/screen apis
-rw-r--r--po/POTFILES.in1
-rw-r--r--src/bin/Makefile.mk2
-rw-r--r--src/bin/e_actions.c47
-rw-r--r--src/bin/e_backlight.c4
-rw-r--r--src/bin/e_bindings.c4
-rw-r--r--src/bin/e_client.c6
-rw-r--r--src/bin/e_comp.c16
-rw-r--r--src/bin/e_comp.h7
-rw-r--r--src/bin/e_comp_canvas.c107
-rw-r--r--src/bin/e_comp_canvas.h6
-rw-r--r--src/bin/e_comp_object.c4
-rw-r--r--src/bin/e_comp_wl.c2
-rw-r--r--src/bin/e_comp_x.c95
-rw-r--r--src/bin/e_desk.c6
-rw-r--r--src/bin/e_desklock.c2
-rw-r--r--src/bin/e_dnd.c12
-rw-r--r--src/bin/e_fm.c7
-rw-r--r--src/bin/e_grab_dialog.c2
-rw-r--r--src/bin/e_hints.c47
-rw-r--r--src/bin/e_hints.h4
-rw-r--r--src/bin/e_includes.h1
-rw-r--r--src/bin/e_int_client_menu.c2
-rw-r--r--src/bin/e_ipc.c19
-rw-r--r--src/bin/e_main.c10
-rw-r--r--src/bin/e_manager.c204
-rw-r--r--src/bin/e_manager.h52
-rw-r--r--src/bin/e_sys.c2
-rw-r--r--src/bin/e_test.c32
-rw-r--r--src/bin/e_xsettings.c60
-rw-r--r--src/modules/access/e_mod_main.c4
-rw-r--r--src/modules/conf/e_mod_main.c4
-rw-r--r--src/modules/conf_bindings/e_int_config_acpibindings.c5
-rw-r--r--src/modules/conf_bindings/e_int_config_keybindings.c4
-rw-r--r--src/modules/conf_bindings/e_int_config_mousebindings.c4
-rw-r--r--src/modules/conf_randr/e_smart_monitor.c13
-rw-r--r--src/modules/everything/evry_plug_files.c7
-rw-r--r--src/modules/gadman/e_mod_gadman.c9
-rw-r--r--src/modules/ibar/e_mod_main.c5
-rw-r--r--src/modules/mixer/e_mod_main.c8
-rw-r--r--src/modules/quickaccess/e_mod_quickaccess.c4
-rw-r--r--src/modules/shot/e_mod_main.c12
-rw-r--r--src/modules/systray/e_mod_main.c2
-rw-r--r--src/modules/winlist/e_winlist.c2
-rw-r--r--src/modules/wl_drm/e_mod_main.c4
-rw-r--r--src/modules/wl_fb/e_mod_main.c4
-rw-r--r--src/modules/wl_x11/e_mod_main.c5
46 files changed, 286 insertions, 573 deletions
diff --git a/po/POTFILES.in b/po/POTFILES.in
index ff07cc4..84fc1c4 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -61,7 +61,6 @@ src/bin/e_ipc_codec.c
61src/bin/e_layout.c 61src/bin/e_layout.c
62src/bin/e_livethumb.c 62src/bin/e_livethumb.c
63src/bin/e_main.c 63src/bin/e_main.c
64src/bin/e_manager.c
65src/bin/e_maximize.c 64src/bin/e_maximize.c
66src/bin/e_menu.c 65src/bin/e_menu.c
67src/bin/e_module.c 66src/bin/e_module.c
diff --git a/src/bin/Makefile.mk b/src/bin/Makefile.mk
index 8d85ba1..5a50c0f 100644
--- a/src/bin/Makefile.mk
+++ b/src/bin/Makefile.mk
@@ -121,7 +121,6 @@ src/bin/e_ipc.h \
121src/bin/e_layout.h \ 121src/bin/e_layout.h \
122src/bin/e_livethumb.h \ 122src/bin/e_livethumb.h \
123src/bin/e_log.h \ 123src/bin/e_log.h \
124src/bin/e_manager.h \
125src/bin/e_maximize.h \ 124src/bin/e_maximize.h \
126src/bin/e_menu.h \ 125src/bin/e_menu.h \
127src/bin/e_mmx.h \ 126src/bin/e_mmx.h \
@@ -286,7 +285,6 @@ src/bin/e_ipc_codec.c \
286src/bin/e_layout.c \ 285src/bin/e_layout.c \
287src/bin/e_livethumb.c \ 286src/bin/e_livethumb.c \
288src/bin/e_log.c \ 287src/bin/e_log.c \
289src/bin/e_manager.c \
290src/bin/e_maximize.c \ 288src/bin/e_maximize.c \
291src/bin/e_menu.c \ 289src/bin/e_menu.c \
292src/bin/e_module.c \ 290src/bin/e_module.c \
diff --git a/src/bin/e_actions.c b/src/bin/e_actions.c
index 67d905a..89da676 100644
--- a/src/bin/e_actions.c
+++ b/src/bin/e_actions.c
@@ -1351,9 +1351,7 @@ _e_actions_zone_get(E_Object *obj)
1351{ 1351{
1352 if (obj) 1352 if (obj)
1353 { 1353 {
1354 if (obj->type == (int)E_MANAGER_TYPE) 1354 if (obj->type == (int)E_COMP_TYPE)
1355 return e_zone_current_get();
1356 else if (obj->type == (int)E_COMP_TYPE)
1357 return e_zone_current_get(); 1355 return e_zone_current_get();
1358 else if (obj->type == (int)E_ZONE_TYPE) 1356 else if (obj->type == (int)E_ZONE_TYPE)
1359 return (E_Zone *)obj; 1357 return (E_Zone *)obj;
@@ -1650,20 +1648,10 @@ ACT_FN_GO(screen_send_to, )
1650 scr = strtol(params, NULL, 10); 1648 scr = strtol(params, NULL, 10);
1651 if (errno) return; 1649 if (errno) return;
1652 1650
1653 if (eina_list_count(e_manager_list()) > 1) 1651 if (scr != -1)
1654 { 1652 scr = scr % eina_list_count(e_comp->zones);
1655 if (scr != -1) 1653 if (scr < 0) scr += eina_list_count(e_comp->zones);
1656 scr = scr % eina_list_count(e_manager_list()); 1654 zone2 = e_comp_zone_number_get(scr);
1657 if (scr < 0) scr += eina_list_count(e_manager_list());
1658 zone2 = e_comp_zone_number_get(0);
1659 }
1660 else
1661 {
1662 if (scr != -1)
1663 scr = scr % eina_list_count(e_comp->zones);
1664 if (scr < 0) scr += eina_list_count(e_comp->zones);
1665 zone2 = e_comp_zone_number_get(scr);
1666 }
1667 if ((zone2) && (zone != zone2)) 1655 if ((zone2) && (zone != zone2))
1668 { 1656 {
1669 ecore_evas_pointer_warp(e_comp->ee, 1657 ecore_evas_pointer_warp(e_comp->ee,
@@ -1686,22 +1674,11 @@ ACT_FN_GO(screen_send_by, )
1686 errno = 0; 1674 errno = 0;
1687 scr = strtol(params, NULL, 10); 1675 scr = strtol(params, NULL, 10);
1688 if (errno) return; 1676 if (errno) return;
1689 if (eina_list_count(e_manager_list()) > 1) 1677 scr += zone->num;
1690 { 1678 if (scr != -1)
1691 scr += e_comp->num; 1679 scr = scr % eina_list_count(e_comp->zones);
1692 if (scr != -1) 1680 if (scr < 0) scr += eina_list_count(e_comp->zones);
1693 scr = scr % eina_list_count(e_manager_list()); 1681 zone2 = e_comp_zone_number_get(scr);
1694 if (scr < 0) scr += eina_list_count(e_manager_list());
1695 zone2 = e_comp_zone_number_get(0);
1696 }
1697 else
1698 {
1699 scr += zone->num;
1700 if (scr != -1)
1701 scr = scr % eina_list_count(e_comp->zones);
1702 if (scr < 0) scr += eina_list_count(e_comp->zones);
1703 zone2 = e_comp_zone_number_get(scr);
1704 }
1705 if ((zone2) && (zone != zone2)) 1682 if ((zone2) && (zone != zone2))
1706 { 1683 {
1707 ecore_evas_pointer_warp(e_comp->ee, 1684 ecore_evas_pointer_warp(e_comp->ee,
@@ -1873,8 +1850,8 @@ ACT_FN_GO_MOUSE(menu_show, )
1873 m->zone = zone; 1850 m->zone = zone;
1874 x = ev->canvas.x; 1851 x = ev->canvas.x;
1875 y = ev->canvas.y; 1852 y = ev->canvas.y;
1876 x -= e_comp->man->x; 1853 x -= e_comp->x;
1877 y -= e_comp->man->y; 1854 y -= e_comp->y;
1878 e_menu_post_deactivate_callback_set(m, _e_actions_cb_menu_end, NULL); 1855 e_menu_post_deactivate_callback_set(m, _e_actions_cb_menu_end, NULL);
1879 e_menu_activate_mouse(m, zone, x, y, 1, 1, 1856 e_menu_activate_mouse(m, zone, x, y, 1, 1,
1880 E_MENU_POP_DIRECTION_DOWN, ev->timestamp); 1857 E_MENU_POP_DIRECTION_DOWN, ev->timestamp);
diff --git a/src/bin/e_backlight.c b/src/bin/e_backlight.c
index 83a2292..12e8db1 100644
--- a/src/bin/e_backlight.c
+++ b/src/bin/e_backlight.c
@@ -202,7 +202,7 @@ _e_backlight_update(void)
202 Ecore_X_Randr_Output *out; 202 Ecore_X_Randr_Output *out;
203 int i, num = 0; 203 int i, num = 0;
204 204
205 root = e_comp->man->root; 205 root = e_comp->root;
206 // try randr 206 // try randr
207 if (root && xbl_avail) 207 if (root && xbl_avail)
208 { 208 {
@@ -269,7 +269,7 @@ _e_backlight_set(double val)
269 int num = 0, i; 269 int num = 0, i;
270 char *name; 270 char *name;
271 271
272 root = e_comp->man->root; 272 root = e_comp->root;
273 out = ecore_x_randr_window_outputs_get(root, &num); 273 out = ecore_x_randr_window_outputs_get(root, &num);
274 if ((out) && (num > 0)) 274 if ((out) && (num > 0))
275 { 275 {
diff --git a/src/bin/e_bindings.c b/src/bin/e_bindings.c
index b803dab..f59e017 100644
--- a/src/bin/e_bindings.c
+++ b/src/bin/e_bindings.c
@@ -313,13 +313,13 @@ e_bindings_key_reset(void)
313 E_Config_Binding_Key *ebk; 313 E_Config_Binding_Key *ebk;
314 Eina_List *l; 314 Eina_List *l;
315 315
316 e_managers_keys_ungrab(); 316 e_comp_canvas_keys_ungrab();
317 E_FREE_LIST(key_bindings, _e_bindings_key_free); 317 E_FREE_LIST(key_bindings, _e_bindings_key_free);
318 318
319 EINA_LIST_FOREACH(e_bindings->key_bindings, l, ebk) 319 EINA_LIST_FOREACH(e_bindings->key_bindings, l, ebk)
320 e_bindings_key_add(ebk->context, ebk->key, ebk->modifiers, 320 e_bindings_key_add(ebk->context, ebk->key, ebk->modifiers,
321 ebk->any_mod, ebk->action, ebk->params); 321 ebk->any_mod, ebk->action, ebk->params);
322 e_managers_keys_grab(); 322 e_comp_canvas_keys_grab();
323} 323}
324 324
325EAPI void 325EAPI void
diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index fc945e6..4f72d7c 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -2321,8 +2321,8 @@ e_client_idler_before(void)
2321 } 2321 }
2322 2322
2323 if ((!ec->new_client) && (!e_client_util_ignored_get(ec)) && 2323 if ((!ec->new_client) && (!e_client_util_ignored_get(ec)) &&
2324 (!E_INSIDE(ec->x, ec->y, 0, 0, e_comp->man->w - 5, e_comp->man->h - 5)) && 2324 (!E_INSIDE(ec->x, ec->y, 0, 0, e_comp->w - 5, e_comp->h - 5)) &&
2325 (!E_INSIDE(ec->x, ec->y, 0 - ec->w + 5, 0 - ec->h + 5, e_comp->man->w - 5, e_comp->man->h - 5)) 2325 (!E_INSIDE(ec->x, ec->y, 0 - ec->w + 5, 0 - ec->h + 5, e_comp->w - 5, e_comp->h - 5))
2326 ) 2326 )
2327 { 2327 {
2328 if (e_config->screen_limits != E_CLIENT_OFFSCREEN_LIMIT_ALLOW_FULL) 2328 if (e_config->screen_limits != E_CLIENT_OFFSCREEN_LIMIT_ALLOW_FULL)
@@ -3457,7 +3457,7 @@ e_client_focused_set(E_Client *ec)
3457 if (!focus_track_frozen) 3457 if (!focus_track_frozen)
3458 e_client_focus_latest_set(ec); 3458 e_client_focus_latest_set(ec);
3459 3459
3460 e_hints_active_window_set(e_comp->man, ec); 3460 e_hints_active_window_set(ec);
3461 _e_client_event_simple(ec, E_EVENT_CLIENT_FOCUS_IN); 3461 _e_client_event_simple(ec, E_EVENT_CLIENT_FOCUS_IN);
3462} 3462}
3463 3463
diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c
index e77f989..7af340a 100644
--- a/src/bin/e_comp.c
+++ b/src/bin/e_comp.c
@@ -185,7 +185,7 @@ _e_comp_fullscreen_check(void)
185 while (o) 185 while (o)
186 { 186 {
187 if (_e_comp_visible_object_is_above 187 if (_e_comp_visible_object_is_above
188 (o, 0, 0, e_comp->man->w, e_comp->man->h)) return NULL; 188 (o, 0, 0, e_comp->w, e_comp->h)) return NULL;
189 o = evas_object_smart_parent_get(o); 189 o = evas_object_smart_parent_get(o);
190 } 190 }
191 return ec; 191 return ec;
@@ -633,7 +633,7 @@ _e_comp_shapes_update_comp_client_shape_comp_helper(E_Client *ec, Eina_Tiler *tb
633 { 633 {
634 x = rect->x, y = rect->y, w = rect->w, h = rect->h; 634 x = rect->x, y = rect->y, w = rect->w, h = rect->h;
635 x += ec->client.x, y += ec->client.y; 635 x += ec->client.x, y += ec->client.y;
636 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); 636 E_RECTS_CLIP_TO_RECT(x, y, w, h, e_comp->x, e_comp->y, e_comp->w, e_comp->h);
637 if ((w < 1) || (h < 1)) continue; 637 if ((w < 1) || (h < 1)) continue;
638 //#ifdef SHAPE_DEBUG not sure we can shape check these? 638 //#ifdef SHAPE_DEBUG not sure we can shape check these?
639 //r = E_NEW(Eina_Rectangle, 1); 639 //r = E_NEW(Eina_Rectangle, 1);
@@ -706,10 +706,10 @@ _e_comp_shapes_update_job(void *d EINA_UNUSED)
706#endif 706#endif
707 707
708 E_FREE_LIST(e_comp->debug_rects, evas_object_del); 708 E_FREE_LIST(e_comp->debug_rects, evas_object_del);
709 tb = eina_tiler_new(e_comp->man->w, e_comp->man->h); 709 tb = eina_tiler_new(e_comp->w, e_comp->h);
710 eina_tiler_tile_size_set(tb, 1, 1); 710 eina_tiler_tile_size_set(tb, 1, 1);
711 /* background */ 711 /* background */
712 eina_tiler_rect_add(tb, &(Eina_Rectangle){0, 0, e_comp->man->w, e_comp->man->h}); 712 eina_tiler_rect_add(tb, &(Eina_Rectangle){0, 0, e_comp->w, e_comp->h});
713 713
714 ec = e_client_bottom_get(); 714 ec = e_client_bottom_get();
715 if (ec) o = ec->frame; 715 if (ec) o = ec->frame;
@@ -808,7 +808,7 @@ _e_comp_free(E_Comp *c)
808{ 808{
809 E_FREE_LIST(c->zones, e_object_del); 809 E_FREE_LIST(c->zones, e_object_del);
810 810
811 e_comp_canvas_init(); 811 e_comp_canvas_clear();
812 812
813 ecore_evas_free(c->ee); 813 ecore_evas_free(c->ee);
814 eina_stringshare_del(c->name); 814 eina_stringshare_del(c->name);
@@ -901,7 +901,7 @@ _e_comp_act_opacity_obj_finder(E_Object *obj)
901 case E_CLIENT_TYPE: 901 case E_CLIENT_TYPE:
902 return ((E_Client*)obj)->frame; 902 return ((E_Client*)obj)->frame;
903 case E_ZONE_TYPE: 903 case E_ZONE_TYPE:
904 case E_MANAGER_TYPE: 904 case E_COMP_TYPE:
905 case E_MENU_TYPE: 905 case E_MENU_TYPE:
906 ec = e_client_focused_get(); 906 ec = e_client_focused_get();
907 return ec ? ec->frame : NULL; 907 return ec ? ec->frame : NULL;
@@ -1450,7 +1450,7 @@ e_comp_block_window_add(void)
1450{ 1450{
1451 e_comp->block_count++; 1451 e_comp->block_count++;
1452 if (e_comp->block_win) return; 1452 if (e_comp->block_win) return;
1453 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); 1453 e_comp->block_win = ecore_x_window_new(e_comp->root, e_comp->x, e_comp->y, e_comp->w, e_comp->h);
1454 INF("BLOCK WIN: %x", e_comp->block_win); 1454 INF("BLOCK WIN: %x", e_comp->block_win);
1455 ecore_x_window_background_color_set(e_comp->block_win, 0, 0, 0); 1455 ecore_x_window_background_color_set(e_comp->block_win, 0, 0, 0);
1456 e_comp_ignore_win_add(e_comp->block_win); 1456 e_comp_ignore_win_add(e_comp->block_win);
@@ -1474,7 +1474,7 @@ e_comp_block_window_del(void)
1474EAPI E_Comp * 1474EAPI E_Comp *
1475e_comp_find_by_window(Ecore_Window win) 1475e_comp_find_by_window(Ecore_Window win)
1476{ 1476{
1477 if ((e_comp->win == win) || (e_comp->ee_win == win) || (e_comp->man->root == win)) return e_comp; 1477 if ((e_comp->win == win) || (e_comp->ee_win == win) || (e_comp->root == win)) return e_comp;
1478 return NULL; 1478 return NULL;
1479} 1479}
1480 1480
diff --git a/src/bin/e_comp.h b/src/bin/e_comp.h
index 82cda68..3669fcb 100644
--- a/src/bin/e_comp.h
+++ b/src/bin/e_comp.h
@@ -60,15 +60,16 @@ typedef void (*E_Comp_Grab_Cb)(void);
60struct _E_Comp 60struct _E_Comp
61{ 61{
62 E_Object e_obj_inherit; 62 E_Object e_obj_inherit;
63 int x, y, w, h;
63 64
64 Ecore_Window win; // input overlay 65 Ecore_Window win; // input overlay
66 Ecore_Window root;
65 Ecore_Evas *ee; 67 Ecore_Evas *ee;
66 Ecore_Window ee_win; 68 Ecore_Window ee_win;
67 Evas_Object *elm; 69 Evas_Object *elm;
68 Evas *evas; 70 Evas *evas;
69 Evas_Object *bg_blank_object; 71 Evas_Object *bg_blank_object;
70 Eina_List *zones; 72 Eina_List *zones;
71 E_Manager *man;
72 E_Pointer *pointer; 73 E_Pointer *pointer;
73 Eina_List *clients; 74 Eina_List *clients;
74 unsigned int new_clients; 75 unsigned int new_clients;
@@ -201,8 +202,8 @@ e_comp_util_client_is_fullscreen(const E_Client *ec)
201 if ((!ec->visible) || (ec->input_only)) 202 if ((!ec->visible) || (ec->input_only))
202 return EINA_FALSE; 203 return EINA_FALSE;
203 return ((ec->client.x == 0) && (ec->client.y == 0) && 204 return ((ec->client.x == 0) && (ec->client.y == 0) &&
204 ((ec->client.w) >= e_comp->man->w) && 205 ((ec->client.w) >= e_comp->w) &&
205 ((ec->client.h) >= e_comp->man->h) && 206 ((ec->client.h) >= e_comp->h) &&
206 (!ec->argb) && (!ec->shaped) 207 (!ec->argb) && (!ec->shaped)
207 ); 208 );
208} 209}
diff --git a/src/bin/e_comp_canvas.c b/src/bin/e_comp_canvas.c
index 4bfdf41..a84a3a3 100644
--- a/src/bin/e_comp_canvas.c
+++ b/src/bin/e_comp_canvas.c
@@ -1,11 +1,13 @@
1#include "e.h" 1#include "e.h"
2 2
3static Eina_List *handlers; 3static Eina_List *handlers;
4static Ecore_Timer *timer_post_screensaver_lock = NULL;
4 5
5static void 6static void
6_e_comp_canvas_cb_del() 7_e_comp_canvas_cb_del()
7{ 8{
8 E_FREE_LIST(handlers, ecore_event_handler_del); 9 E_FREE_LIST(handlers, ecore_event_handler_del);
10 E_FREE_FUNC(timer_post_screensaver_lock, ecore_timer_del);
9} 11}
10 12
11static void 13static void
@@ -88,6 +90,33 @@ _e_comp_canvas_cb_mouse_wheel(void *d EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Obj
88 e_bindings_wheel_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(e_comp), event_info); 90 e_bindings_wheel_evas_event_handle(E_BINDING_CONTEXT_COMPOSITOR, E_OBJECT(e_comp), event_info);
89} 91}
90 92
93static Eina_Bool
94_e_comp_cb_key_down(void *data EINA_UNUSED, int ev_type EINA_UNUSED, Ecore_Event_Key *ev)
95{
96 if (ev->event_window != e_comp->root)
97 {
98 E_Client *ec;
99
100 ec = e_client_focused_get();
101 /* *block actions when no client is focused (probably something else did a grab here so we'll play nice)
102 * *block actions when client menu is up
103 * *block actions when event (grab) window isn't comp window
104 * *other cases?
105 */
106 if (!ec) return ECORE_CALLBACK_RENEW;
107 if ((ec->border_menu) || (ev->event_window != e_comp->ee_win))
108 return ECORE_CALLBACK_PASS_ON;
109 }
110 return !e_bindings_key_down_event_handle(E_BINDING_CONTEXT_MANAGER, E_OBJECT(e_comp), ev);
111}
112
113static Eina_Bool
114_e_comp_cb_key_up(void *data EINA_UNUSED, int ev_type EINA_UNUSED, Ecore_Event_Key *ev)
115{
116 if (ev->event_window != e_comp->root) return ECORE_CALLBACK_PASS_ON;
117 return !e_bindings_key_up_event_handle(E_BINDING_CONTEXT_MANAGER, E_OBJECT(e_comp), ev);
118}
119
91//////////////////////////////////// 120////////////////////////////////////
92 121
93static Eina_Bool 122static Eina_Bool
@@ -108,6 +137,36 @@ _e_comp_canvas_screensaver_active(void *d EINA_UNUSED, Evas_Object *obj EINA_UNU
108 ecore_evas_manual_render_set(e_comp->ee, EINA_TRUE); 137 ecore_evas_manual_render_set(e_comp->ee, EINA_TRUE);
109} 138}
110 139
140static Eina_Bool
141_e_comp_cb_timer_post_screensaver_lock(void *data EINA_UNUSED)
142{
143 e_desklock_show_autolocked();
144 timer_post_screensaver_lock = NULL;
145 return ECORE_CALLBACK_CANCEL;
146}
147
148static Eina_Bool
149_e_comp_cb_screensaver_on()
150{
151 if (e_config->desklock_autolock_screensaver)
152 {
153 E_FREE_FUNC(timer_post_screensaver_lock, ecore_timer_del);
154 if (e_config->desklock_post_screensaver_time <= 1.0)
155 e_desklock_show_autolocked();
156 else
157 timer_post_screensaver_lock = ecore_timer_add
158 (e_config->desklock_post_screensaver_time,
159 _e_comp_cb_timer_post_screensaver_lock, NULL);
160 }
161 return ECORE_CALLBACK_PASS_ON;
162}
163
164static Eina_Bool
165_e_comp_cb_screensaver_off()
166{
167 E_FREE_FUNC(timer_post_screensaver_lock, ecore_timer_del);
168 return ECORE_CALLBACK_PASS_ON;
169}
111//////////////////////////////////// 170////////////////////////////////////
112 171
113static int 172static int
@@ -120,12 +179,14 @@ _e_comp_canvas_cb_zone_sort(const void *data1, const void *data2)
120 179
121 180
122EAPI Eina_Bool 181EAPI Eina_Bool
123e_comp_canvas_init(void) 182e_comp_canvas_init(int w, int h)
124{ 183{
125 Evas_Object *o; 184 Evas_Object *o;
126 Eina_List *screens; 185 Eina_List *screens;
127 186
128 e_comp->evas = ecore_evas_get(e_comp->ee); 187 e_comp->evas = ecore_evas_get(e_comp->ee);
188 e_comp->w = w;
189 e_comp->h = h;
129 190
130 if (e_first_frame) 191 if (e_first_frame)
131 evas_event_callback_add(e_comp->evas, EVAS_CALLBACK_RENDER_POST, _e_comp_canvas_cb_first_frame, NULL); 192 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)
133 e_comp->bg_blank_object = o; 194 e_comp->bg_blank_object = o;
134 evas_object_layer_set(o, E_LAYER_BOTTOM); 195 evas_object_layer_set(o, E_LAYER_BOTTOM);
135 evas_object_move(o, 0, 0); 196 evas_object_move(o, 0, 0);
136 evas_object_resize(o, e_comp->man->w, e_comp->man->h); 197 evas_object_resize(o, e_comp->w, e_comp->h);
137 evas_object_color_set(o, 0, 0, 0, 255); 198 evas_object_color_set(o, 0, 0, 0, 255);
138 evas_object_name_set(o, "comp->bg_blank_object"); 199 evas_object_name_set(o, "comp->bg_blank_object");
139 evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, (Evas_Object_Event_Cb)_e_comp_canvas_cb_mouse_down, NULL); 200 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)
163 } 224 }
164 } 225 }
165 else 226 else
166 e_zone_new(0, 0, 0, 0, e_comp->man->w, e_comp->man->h); 227 e_zone_new(0, 0, 0, 0, e_comp->w, e_comp->h);
167 E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_MOVE_RESIZE, _e_comp_cb_zone_change, NULL); 228 E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_MOVE_RESIZE, _e_comp_cb_zone_change, NULL);
168 E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_ADD, _e_comp_cb_zone_change, NULL); 229 E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_ADD, _e_comp_cb_zone_change, NULL);
169 E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_DEL, _e_comp_cb_zone_change, NULL); 230 E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_DEL, _e_comp_cb_zone_change, NULL);
231 E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_KEY_DOWN, _e_comp_cb_key_down, NULL);
232 E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_KEY_UP, _e_comp_cb_key_up, NULL);
233 E_LIST_HANDLER_APPEND(handlers, E_EVENT_SCREENSAVER_ON, _e_comp_cb_screensaver_on, NULL);
234 E_LIST_HANDLER_APPEND(handlers, E_EVENT_SCREENSAVER_OFF, _e_comp_cb_screensaver_off, NULL);
170 235
171 return EINA_TRUE; 236 return EINA_TRUE;
172} 237}
@@ -187,23 +252,23 @@ e_comp_canvas_clear(void)
187////////////////////////////////////////////// 252//////////////////////////////////////////////
188 253
189EAPI void 254EAPI void
190e_comp_all_freeze(void) 255e_comp_canvas_resize(int w, int h)
191{ 256{
192 Eina_List *l; 257 e_comp->w = w;
193 E_Manager *man; 258 e_comp->h = h;
259 ecore_evas_resize(e_comp->ee, w, h);
260}
194 261
195 EINA_LIST_FOREACH(e_manager_list(), l, man) 262EAPI void
196 evas_event_freeze(man->comp->evas); 263e_comp_all_freeze(void)
264{
265 evas_event_freeze(e_comp->evas);
197} 266}
198 267
199EAPI void 268EAPI void
200e_comp_all_thaw(void) 269e_comp_all_thaw(void)
201{ 270{
202 Eina_List *l; 271 evas_event_thaw(e_comp->evas);
203 E_Manager *man;
204
205 EINA_LIST_FOREACH(e_manager_list(), l, man)
206 evas_event_thaw(man->comp->evas);
207} 272}
208 273
209EAPI E_Zone * 274EAPI E_Zone *
@@ -412,7 +477,7 @@ e_comp_canvas_update(void)
412 z = e_comp_zone_number_get(0); 477 z = e_comp_zone_number_get(0);
413 if (z) 478 if (z)
414 { 479 {
415 changed |= e_zone_move_resize(z, 0, 0, e_comp->man->w, e_comp->man->h); 480 changed |= e_zone_move_resize(z, 0, 0, e_comp->w, e_comp->h);
416 if (changed) e_shelf_zone_move_resize_handle(z); 481 if (changed) e_shelf_zone_move_resize_handle(z);
417 } 482 }
418 } 483 }
@@ -585,3 +650,17 @@ e_comp_canvas_client_layer_map_nearest(int layer)
585 LAYER_MAP(E_LAYER_CLIENT_DRAG); 650 LAYER_MAP(E_LAYER_CLIENT_DRAG);
586 return E_LAYER_CLIENT_PRIO; 651 return E_LAYER_CLIENT_PRIO;
587} 652}
653
654EAPI void
655e_comp_canvas_keys_grab(void)
656{
657 if (e_comp->root)
658 e_bindings_key_grab(E_BINDING_CONTEXT_ANY, e_comp->root);
659}
660
661EAPI void
662e_comp_canvas_keys_ungrab(void)
663{
664 if (e_comp->root)
665 e_bindings_key_ungrab(E_BINDING_CONTEXT_ANY, e_comp->root);
666}
diff --git a/src/bin/e_comp_canvas.h b/src/bin/e_comp_canvas.h
index 7d66d40..df22610 100644
--- a/src/bin/e_comp_canvas.h
+++ b/src/bin/e_comp_canvas.h
@@ -8,8 +8,9 @@
8 8
9extern EAPI int E_EVENT_COMPOSITOR_RESIZE; 9extern EAPI int E_EVENT_COMPOSITOR_RESIZE;
10 10
11EAPI Eina_Bool e_comp_canvas_init(void); 11EAPI Eina_Bool e_comp_canvas_init(int w, int h);
12EINTERN void e_comp_canvas_clear(void); 12EINTERN void e_comp_canvas_clear(void);
13EAPI void e_comp_canvas_resize(int w, int h);
13EAPI void e_comp_all_freeze(void); 14EAPI void e_comp_all_freeze(void);
14EAPI void e_comp_all_thaw(void); 15EAPI void e_comp_all_thaw(void);
15EAPI E_Zone * e_comp_zone_xy_get(Evas_Coord x, Evas_Coord y); 16EAPI 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);
24EAPI unsigned int e_comp_canvas_layer_map(E_Layer layer); 25EAPI unsigned int e_comp_canvas_layer_map(E_Layer layer);
25EAPI unsigned int e_comp_canvas_client_layer_map(E_Layer layer); 26EAPI unsigned int e_comp_canvas_client_layer_map(E_Layer layer);
26EAPI E_Layer e_comp_canvas_client_layer_map_nearest(int layer); 27EAPI E_Layer e_comp_canvas_client_layer_map_nearest(int layer);
27 28EAPI void e_comp_canvas_keys_grab(void);
29EAPI void e_comp_canvas_keys_ungrab(void);
28 30
29/* the following functions are used for adjusting root window coordinates 31/* the following functions are used for adjusting root window coordinates
30 * to/from canvas coordinates. 32 * to/from canvas coordinates.
diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c
index eee3aa9..706eb2e 100644
--- a/src/bin/e_comp_object.c
+++ b/src/bin/e_comp_object.c
@@ -2636,7 +2636,7 @@ e_comp_object_util_fullscreen(Evas_Object *obj)
2636 else 2636 else
2637 { 2637 {
2638 evas_object_move(obj, 0, 0); 2638 evas_object_move(obj, 0, 0);
2639 evas_object_resize(obj, e_comp->man->w, e_comp->man->h); 2639 evas_object_resize(obj, e_comp->w, e_comp->h);
2640 } 2640 }
2641} 2641}
2642 2642
@@ -3687,7 +3687,7 @@ _e_comp_object_autoclose_setup(Evas_Object *obj)
3687 /* create rect just below autoclose object to catch mouse events */ 3687 /* create rect just below autoclose object to catch mouse events */
3688 e_comp->autoclose.rect = evas_object_rectangle_add(e_comp->evas); 3688 e_comp->autoclose.rect = evas_object_rectangle_add(e_comp->evas);
3689 evas_object_move(e_comp->autoclose.rect, 0, 0); 3689 evas_object_move(e_comp->autoclose.rect, 0, 0);
3690 evas_object_resize(e_comp->autoclose.rect, e_comp->man->w, e_comp->man->h); 3690 evas_object_resize(e_comp->autoclose.rect, e_comp->w, e_comp->h);
3691 evas_object_show(e_comp->autoclose.rect); 3691 evas_object_show(e_comp->autoclose.rect);
3692 evas_object_name_set(e_comp->autoclose.rect, "e_comp->autoclose.rect"); 3692 evas_object_name_set(e_comp->autoclose.rect, "e_comp->autoclose.rect");
3693 evas_object_color_set(e_comp->autoclose.rect, 0, 0, 0, 0); 3693 evas_object_color_set(e_comp->autoclose.rect, 0, 0, 0, 0);
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index e43083b..a69e759 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -1515,7 +1515,7 @@ _e_comp_wl_compositor_cb_region_create(struct wl_client *client, struct wl_resou
1515 DBG("Region Create: %d", wl_resource_get_id(resource)); 1515 DBG("Region Create: %d", wl_resource_get_id(resource));
1516 1516
1517 /* try to create new tiler */ 1517 /* try to create new tiler */
1518 if (!(tiler = eina_tiler_new(e_comp->man->w, e_comp->man->h))) 1518 if (!(tiler = eina_tiler_new(e_comp->w, e_comp->h)))
1519 { 1519 {
1520 ERR("Could not create Eina_Tiler"); 1520 ERR("Could not create Eina_Tiler");
1521 wl_resource_post_no_memory(resource); 1521 wl_resource_post_no_memory(resource);
diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index 75e6ed2..f68224c 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -944,7 +944,7 @@ _e_comp_x_evas_unfullscreen_zoom_cb(void *data EINA_UNUSED, Evas_Object *obj EIN
944{ 944{
945 if ((screen_size.width != -1) && (screen_size.height != -1)) 945 if ((screen_size.width != -1) && (screen_size.height != -1))
946 { 946 {
947 ecore_x_randr_screen_primary_output_size_set(e_comp->man->root, 947 ecore_x_randr_screen_primary_output_size_set(e_comp->root,
948 screen_size_index); 948 screen_size_index);
949 screen_size.width = -1; 949 screen_size.width = -1;
950 screen_size.height = -1; 950 screen_size.height = -1;
@@ -958,11 +958,11 @@ _e_comp_x_evas_fullscreen_zoom_cb(void *data, Evas_Object *obj EINA_UNUSED, void
958 Ecore_X_Randr_Screen_Size_MM *sizes; 958 Ecore_X_Randr_Screen_Size_MM *sizes;
959 int num_sizes, i, best_size_index = 0; 959 int num_sizes, i, best_size_index = 0;
960 960
961 ecore_x_randr_screen_primary_output_current_size_get(e_comp->man->root, 961 ecore_x_randr_screen_primary_output_current_size_get(e_comp->root,
962 &screen_size.width, 962 &screen_size.width,
963 &screen_size.height, 963 &screen_size.height,
964 NULL, NULL, NULL); 964 NULL, NULL, NULL);
965 sizes = ecore_x_randr_screen_primary_output_sizes_get(e_comp->man->root, 965 sizes = ecore_x_randr_screen_primary_output_sizes_get(e_comp->root,
966 &num_sizes); 966 &num_sizes);
967 if (sizes) 967 if (sizes)
968 { 968 {
@@ -987,7 +987,7 @@ _e_comp_x_evas_fullscreen_zoom_cb(void *data, Evas_Object *obj EINA_UNUSED, void
987 ((best_size.width != screen_size.width) || 987 ((best_size.width != screen_size.width) ||
988 (best_size.height != screen_size.height))) 988 (best_size.height != screen_size.height)))
989 { 989 {
990 if (ecore_x_randr_screen_primary_output_size_set(e_comp->man->root, 990 if (ecore_x_randr_screen_primary_output_size_set(e_comp->root,
991 best_size_index)) 991 best_size_index))
992 screen_size_index = best_size_index; 992 screen_size_index = best_size_index;
993 evas_object_geometry_set(ec->frame, 0, 0, best_size.width, best_size.height); 993 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
1109 if (e_comp_ignore_win_find(ev->win) || 1109 if (e_comp_ignore_win_find(ev->win) ||
1110 (ec && (ec->ignored || ec->override)) || 1110 (ec && (ec->ignored || ec->override)) ||
1111 (!e_comp_find_by_window(ev->parent)) || 1111 (!e_comp_find_by_window(ev->parent)) ||
1112 (ev->parent != e_comp->man->root)) 1112 (ev->parent != e_comp->root))
1113 { 1113 {
1114 ecore_x_window_show(ev->win); 1114 ecore_x_window_show(ev->win);
1115 return ECORE_CALLBACK_RENEW; 1115 return ECORE_CALLBACK_RENEW;
@@ -1220,9 +1220,9 @@ _e_comp_x_show(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Windo
1220 if (e_comp_ignore_win_find(ev->win)) return ECORE_CALLBACK_RENEW; 1220 if (e_comp_ignore_win_find(ev->win)) return ECORE_CALLBACK_RENEW;
1221 c = e_comp_find_by_window(ev->event_win); 1221 c = e_comp_find_by_window(ev->event_win);
1222 if (!c) return ECORE_CALLBACK_RENEW; 1222 if (!c) return ECORE_CALLBACK_RENEW;
1223 if (ev->event_win != c->man->root) return ECORE_CALLBACK_RENEW; 1223 if (ev->event_win != e_comp->root) return ECORE_CALLBACK_RENEW;
1224 if ((c->win == ev->win) || (c->ee_win == ev->win) || 1224 if ((c->win == ev->win) || (c->ee_win == ev->win) ||
1225 (c->man->root == ev->win) || (c->cm_selection == ev->win)) return ECORE_CALLBACK_RENEW; 1225 (c->root == ev->win) || (c->cm_selection == ev->win)) return ECORE_CALLBACK_RENEW;
1226 /* some window which we haven't made a client for yet but need to */ 1226 /* some window which we haven't made a client for yet but need to */
1227 ec = _e_comp_x_client_new(ev->win, 0); 1227 ec = _e_comp_x_client_new(ev->win, 0);
1228 if (!ec) 1228 if (!ec)
@@ -1323,7 +1323,7 @@ _e_comp_x_configure(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_
1323 if (e_comp_find_by_window(ev->win)) 1323 if (e_comp_find_by_window(ev->win))
1324 { 1324 {
1325 // do not handle this here - use randr events 1325 // do not handle this here - use randr events
1326 //e_manager_resize(c->man, ev->w, ev->h); 1326 //e_comp_canvas_resize(ev->w, ev->h);
1327 return ECORE_CALLBACK_RENEW; 1327 return ECORE_CALLBACK_RENEW;
1328 } 1328 }
1329 ec = _e_comp_x_client_find_by_window(ev->win); 1329 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
1473 else 1473 else
1474 { 1474 {
1475 /* client is completely outside the screen, policy does not allow */ 1475 /* client is completely outside the screen, policy does not allow */
1476 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)) && 1476 if (((!E_INTERSECTS(x, y, ec->w, ec->h, e_comp->x, e_comp->y, e_comp->w - 5, e_comp->h - 5)) &&
1477 (e_config->screen_limits != E_CLIENT_OFFSCREEN_LIMIT_ALLOW_FULL)) || 1477 (e_config->screen_limits != E_CLIENT_OFFSCREEN_LIMIT_ALLOW_FULL)) ||
1478 /* client is partly outside the zone, policy does not allow */ 1478 /* client is partly outside the zone, policy does not allow */
1479 (((!E_INSIDE(x, y, e_comp->man->x, e_comp->man->y, e_comp->man->w - 5, e_comp->man->h - 5)) && 1479 (((!E_INSIDE(x, y, e_comp->x, e_comp->y, e_comp->w - 5, e_comp->h - 5)) &&
1480 (!E_INSIDE(x + ec->w, y, e_comp->man->x, e_comp->man->y, e_comp->man->w - 5, e_comp->man->h - 5)) && 1480 (!E_INSIDE(x + ec->w, y, e_comp->x, e_comp->y, e_comp->w - 5, e_comp->h - 5)) &&
1481 (!E_INSIDE(x, y + ec->h, e_comp->man->x, e_comp->man->y, e_comp->man->w - 5, e_comp->man->h - 5)) && 1481 (!E_INSIDE(x, y + ec->h, e_comp->x, e_comp->y, e_comp->w - 5, e_comp->h - 5)) &&
1482 (!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))) && 1482 (!E_INSIDE(x + ec->w, y + ec->h, e_comp->x, e_comp->y, e_comp->w - 5, e_comp->h - 5))) &&
1483 (e_config->screen_limits == E_CLIENT_OFFSCREEN_LIMIT_ALLOW_NONE)) 1483 (e_config->screen_limits == E_CLIENT_OFFSCREEN_LIMIT_ALLOW_NONE))
1484 ) 1484 )
1485 e_comp_object_util_center(ec->frame); 1485 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
1996 E_Client *ec; 1996 E_Client *ec;
1997 1997
1998 if (_e_comp_x_mapping_change_disabled) return ECORE_CALLBACK_RENEW; 1998 if (_e_comp_x_mapping_change_disabled) return ECORE_CALLBACK_RENEW;
1999 e_managers_keys_ungrab(); 1999 e_comp_canvas_keys_ungrab();
2000 EINA_LIST_FOREACH(e_comp->clients, l, ec) 2000 EINA_LIST_FOREACH(e_comp->clients, l, ec)
2001 { 2001 {
2002 Ecore_X_Window win; 2002 Ecore_X_Window win;
@@ -2011,7 +2011,7 @@ _e_comp_x_mapping_change(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_E
2011 e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, win); 2011 e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, win);
2012 _e_comp_x_focus_setup(ec); 2012 _e_comp_x_focus_setup(ec);
2013 } 2013 }
2014 e_managers_keys_grab(); 2014 e_comp_canvas_keys_grab();
2015 return ECORE_CALLBACK_PASS_ON; 2015 return ECORE_CALLBACK_PASS_ON;
2016} 2016}
2017 2017
@@ -2277,7 +2277,7 @@ _e_comp_x_sync_alarm(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event
2277 evas_object_resize(ec->internal_elm_win, ec->client.w, ec->client.h); 2277 evas_object_resize(ec->internal_elm_win, ec->client.w, ec->client.h);
2278 } 2278 }
2279 2279
2280 ecore_x_pointer_xy_get(e_comp->man->root, 2280 ecore_x_pointer_xy_get(e_comp->root,
2281 &ec->mouse.current.mx, 2281 &ec->mouse.current.mx,
2282 &ec->mouse.current.my); 2282 &ec->mouse.current.my);
2283 2283
@@ -2696,10 +2696,10 @@ _e_comp_x_hook_client_pre_frame_assign(void *d EINA_UNUSED, E_Client *ec)
2696 h = MAX(ec->client.h, 1); 2696 h = MAX(ec->client.h, 1);
2697 /* match ec parent argbness */ 2697 /* match ec parent argbness */
2698 if (ec->argb) 2698 if (ec->argb)
2699 pwin = ecore_x_window_manager_argb_new(e_comp->man->root, ec->client.x, ec->client.y, w, h); 2699 pwin = ecore_x_window_manager_argb_new(e_comp->root, ec->client.x, ec->client.y, w, h);
2700 else 2700 else
2701 { 2701 {
2702 pwin = ecore_x_window_override_new(e_comp->man->root, ec->client.x, ec->client.y, w, h); 2702 pwin = ecore_x_window_override_new(e_comp->root, ec->client.x, ec->client.y, w, h);
2703 ecore_x_window_shape_events_select(pwin, !ec->internal); //let's just agree never to do this with our own windows... 2703 ecore_x_window_shape_events_select(pwin, !ec->internal); //let's just agree never to do this with our own windows...
2704 } 2704 }
2705 2705
@@ -3224,9 +3224,9 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec)
3224 /* some application failing to correctly center a window */ 3224 /* some application failing to correctly center a window */
3225 if (eina_list_count(e_comp->zones) > 1) 3225 if (eina_list_count(e_comp->zones) > 1)
3226 { 3226 {
3227 if (abs((e_comp->man->w / 2) - ec->x - (ec->w / 2)) < 3) 3227 if (abs((e_comp->w / 2) - ec->x - (ec->w / 2)) < 3)
3228 ec->x = ((ec->zone->x + ec->zone->w) / 2) - (ec->w / 2); 3228 ec->x = ((ec->zone->x + ec->zone->w) / 2) - (ec->w / 2);
3229 if (abs((e_comp->man->h / 2) - ec->y - (ec->h / 2)) < 3) 3229 if (abs((e_comp->h / 2) - ec->y - (ec->h / 2)) < 3)
3230 ec->y = ((ec->zone->y + ec->zone->h) / 2) - (ec->h / 2); 3230 ec->y = ((ec->zone->y + ec->zone->h) / 2) - (ec->h / 2);
3231 } 3231 }
3232 ec->changes.pos = 1; 3232 ec->changes.pos = 1;
@@ -4119,7 +4119,7 @@ _e_comp_x_hook_client_redirect(void *d EINA_UNUSED, E_Client *ec)
4119 { 4119 {
4120 /* first window */ 4120 /* first window */
4121 e_comp_x_nocomp_end(); 4121 e_comp_x_nocomp_end();
4122 ecore_x_window_reparent(_e_comp_x_client_window_get(ec), e_comp->man->root, ec->client.x, ec->client.y); 4122 ecore_x_window_reparent(_e_comp_x_client_window_get(ec), e_comp->root, ec->client.x, ec->client.y);
4123 _e_comp_x_client_stack(ec); 4123 _e_comp_x_client_stack(ec);
4124 } 4124 }
4125 if (!ec->comp_data->damage) 4125 if (!ec->comp_data->damage)
@@ -4147,7 +4147,7 @@ _e_comp_x_hook_client_unredirect(void *d EINA_UNUSED, E_Client *ec)
4147 ec->comp_data->unredirected_single = 1; 4147 ec->comp_data->unredirected_single = 1;
4148 } 4148 }
4149 if (!e_comp->nocomp) return; //wait for it... 4149 if (!e_comp->nocomp) return; //wait for it...
4150 ecore_x_composite_unredirect_subwindows(e_comp->man->root, ECORE_X_COMPOSITE_UPDATE_MANUAL); 4150 ecore_x_composite_unredirect_subwindows(e_comp->root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
4151 ecore_x_window_hide(e_comp->win); 4151 ecore_x_window_hide(e_comp->win);
4152} 4152}
4153 4153
@@ -4171,7 +4171,7 @@ _e_comp_x_hook_client_del(void *d EINA_UNUSED, E_Client *ec)
4171 { 4171 {
4172 if (stopping) 4172 if (stopping)
4173 { 4173 {
4174 ecore_x_window_reparent(win, e_comp->man->root, 4174 ecore_x_window_reparent(win, e_comp->root,
4175 ec->client.x, ec->client.y); 4175 ec->client.x, ec->client.y);
4176 ecore_x_window_configure(win, 4176 ecore_x_window_configure(win,
4177 ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING | 4177 ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
@@ -4182,7 +4182,7 @@ _e_comp_x_hook_client_del(void *d EINA_UNUSED, E_Client *ec)
4182 4182
4183 else 4183 else
4184 /* put the window back where we found it to prevent annoying dancing windows */ 4184 /* put the window back where we found it to prevent annoying dancing windows */
4185 ecore_x_window_reparent(win, e_comp->man->root, 4185 ecore_x_window_reparent(win, e_comp->root,
4186 ec->comp_data->initial_attributes.x, 4186 ec->comp_data->initial_attributes.x,
4187 ec->comp_data->initial_attributes.y); 4187 ec->comp_data->initial_attributes.y);
4188 if (!ec->internal) 4188 if (!ec->internal)
@@ -4402,7 +4402,6 @@ _e_comp_x_backlight_notify_cb(void *data EINA_UNUSED, int t EINA_UNUSED, Ecore_X
4402static Eina_Bool 4402static Eina_Bool
4403_e_comp_x_cb_frame_extents_request(void *data EINA_UNUSED, int ev_type EINA_UNUSED, Ecore_X_Event_Frame_Extents_Request *ev) 4403_e_comp_x_cb_frame_extents_request(void *data EINA_UNUSED, int ev_type EINA_UNUSED, Ecore_X_Event_Frame_Extents_Request *ev)
4404{ 4404{
4405 E_Manager *man;
4406 Ecore_X_Window_Type type; 4405 Ecore_X_Window_Type type;
4407 Ecore_X_MWM_Hint_Decor decor; 4406 Ecore_X_MWM_Hint_Decor decor;
4408 Ecore_X_Window_State *state; 4407 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
4413 unsigned int i, num; 4412 unsigned int i, num;
4414 4413
4415 win = ecore_x_window_parent_get(ev->win); 4414 win = ecore_x_window_parent_get(ev->win);
4416 man = e_manager_find_by_root(win); 4415 if (win != e_comp->root) return ECORE_CALLBACK_PASS_ON;
4417 if (!man) return ECORE_CALLBACK_PASS_ON;
4418 4416
4419 /* TODO: 4417 /* TODO:
4420 * * We need to check if we remember this window, and border locking is set 4418 * * 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
4495 extents = E_NEW(Frame_Extents, 1); 4493 extents = E_NEW(Frame_Extents, 1);
4496 if (!extents) return ECORE_CALLBACK_RENEW; 4494 if (!extents) return ECORE_CALLBACK_RENEW;
4497 4495
4498 o = edje_object_add(man->comp->evas); 4496 o = edje_object_add(e_comp->evas);
4499 snprintf(buf, sizeof(buf), "ev/widgets/border/%s/border", border); 4497 snprintf(buf, sizeof(buf), "ev/widgets/border/%s/border", border);
4500 ok = e_theme_edje_object_set(o, "base/theme/borders", buf); 4498 ok = e_theme_edje_object_set(o, "base/theme/borders", buf);
4501 if (ok) 4499 if (ok)
@@ -4676,17 +4674,17 @@ _e_comp_x_xinerama_setup(int rw, int rh)
4676static Eina_Bool 4674static Eina_Bool
4677_e_comp_x_randr_change(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *event_info EINA_UNUSED) 4675_e_comp_x_randr_change(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *event_info EINA_UNUSED)
4678{ 4676{
4679 if ((e_comp->man->w != e_randr2->w) || 4677 if ((e_comp->w != e_randr2->w) ||
4680 (e_comp->man->h != e_randr2->h)) 4678 (e_comp->h != e_randr2->h))
4681 { 4679 {
4682 e_manager_resize(e_comp->man, e_randr2->w, e_randr2->h); 4680 e_comp_canvas_resize(e_randr2->w, e_randr2->h);
4683 } 4681 }
4684 else 4682 else
4685 { 4683 {
4686 E_Client *ec; 4684 E_Client *ec;
4687 4685
4688 ecore_x_netwm_desk_size_set(e_comp->man->root, e_comp->man->w, e_comp->man->h); 4686 ecore_x_netwm_desk_size_set(e_comp->root, e_comp->w, e_comp->h);
4689 _e_comp_x_xinerama_setup(e_comp->man->w, e_comp->man->h); 4687 _e_comp_x_xinerama_setup(e_comp->w, e_comp->h);
4690 4688
4691 e_comp_canvas_update(); 4689 e_comp_canvas_update();
4692 E_CLIENT_FOREACH(ec) 4690 E_CLIENT_FOREACH(ec)
@@ -4703,8 +4701,8 @@ _e_comp_x_ee_resize(Ecore_Evas *ee EINA_UNUSED)
4703{ 4701{
4704 E_Client *ec; 4702 E_Client *ec;
4705 4703
4706 ecore_x_netwm_desk_size_set(e_comp->man->root, e_comp->man->w, e_comp->man->h); 4704 ecore_x_netwm_desk_size_set(e_comp->root, e_comp->w, e_comp->h);
4707 _e_comp_x_xinerama_setup(e_comp->man->w, e_comp->man->h); 4705 _e_comp_x_xinerama_setup(e_comp->w, e_comp->h);
4708 4706
4709 e_comp_canvas_update(); 4707 e_comp_canvas_update();
4710 E_CLIENT_FOREACH(ec) 4708 E_CLIENT_FOREACH(ec)
@@ -4719,10 +4717,10 @@ _e_comp_x_del(E_Comp *c)
4719{ 4717{
4720 unsigned int i; 4718 unsigned int i;
4721 4719
4722 ecore_x_window_key_ungrab(c->man->root, "F", ECORE_EVENT_MODIFIER_SHIFT | 4720 ecore_x_window_key_ungrab(c->root, "F", ECORE_EVENT_MODIFIER_SHIFT |
4723 ECORE_EVENT_MODIFIER_CTRL | 4721 ECORE_EVENT_MODIFIER_CTRL |
4724 ECORE_EVENT_MODIFIER_ALT, 0); 4722 ECORE_EVENT_MODIFIER_ALT, 0);
4725 ecore_x_window_key_ungrab(c->man->root, "Home", ECORE_EVENT_MODIFIER_SHIFT | 4723 ecore_x_window_key_ungrab(c->root, "Home", ECORE_EVENT_MODIFIER_SHIFT |
4726 ECORE_EVENT_MODIFIER_CTRL | 4724 ECORE_EVENT_MODIFIER_CTRL |
4727 ECORE_EVENT_MODIFIER_ALT, 0); 4725 ECORE_EVENT_MODIFIER_ALT, 0);
4728 if (c->grabbed) 4726 if (c->grabbed)
@@ -4735,13 +4733,13 @@ _e_comp_x_del(E_Comp *c)
4735 ecore_x_window_free(c->layers[i].win); 4733 ecore_x_window_free(c->layers[i].win);
4736 4734
4737 ecore_x_composite_unredirect_subwindows 4735 ecore_x_composite_unredirect_subwindows
4738 (c->man->root, ECORE_X_COMPOSITE_UPDATE_MANUAL); 4736 (c->root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
4739 if (c->block_win) ecore_x_window_free(c->block_win); 4737 if (c->block_win) ecore_x_window_free(c->block_win);
4740 ecore_x_composite_render_window_disable(c->win); 4738 ecore_x_composite_render_window_disable(c->win);
4741 if (c->man->num == 0) e_alert_composite_win(c->man->root, 0); 4739 e_alert_composite_win(c->root, 0);
4742 4740
4743 ecore_x_window_free(c->cm_selection); 4741 ecore_x_window_free(c->cm_selection);
4744 ecore_x_screen_is_composited_set(c->man->num, 0); 4742 ecore_x_screen_is_composited_set(c->num, 0);
4745 4743
4746 eina_list_free(c->x_comp_data->retry_clients); 4744 eina_list_free(c->x_comp_data->retry_clients);
4747 ecore_timer_del(c->x_comp_data->retry_timer); 4745 ecore_timer_del(c->x_comp_data->retry_timer);
@@ -4751,7 +4749,6 @@ _e_comp_x_del(E_Comp *c)
4751static void 4749static void
4752_e_comp_x_manage_windows(void) 4750_e_comp_x_manage_windows(void)
4753{ 4751{
4754 E_Manager *man = e_comp->man;
4755 Ecore_X_Window *windows; 4752 Ecore_X_Window *windows;
4756 int wnum; 4753 int wnum;
4757 int i; 4754 int i;
@@ -4767,7 +4764,7 @@ _e_comp_x_manage_windows(void)
4767 4764
4768 /* a manager is designated for each root. lets get all the windows in 4765 /* a manager is designated for each root. lets get all the windows in
4769 the managers root */ 4766 the managers root */
4770 windows = ecore_x_window_children_get(man->root, &wnum); 4767 windows = ecore_x_window_children_get(e_comp->root, &wnum);
4771 if (!windows) return; 4768 if (!windows) return;
4772 4769
4773 ecore_x_atoms_get(atom_names, 3, atoms); 4770 ecore_x_atoms_get(atom_names, 3, atoms);
@@ -4782,7 +4779,7 @@ _e_comp_x_manage_windows(void)
4782 E_Client *ec = NULL; 4779 E_Client *ec = NULL;
4783 4780
4784 if ((e_comp->win == windows[i]) || (e_comp->ee_win == windows[i]) || 4781 if ((e_comp->win == windows[i]) || (e_comp->ee_win == windows[i]) ||
4785 (e_comp->man->root == windows[i]) || (e_comp->cm_selection == windows[i])) 4782 (e_comp->root == windows[i]) || (e_comp->cm_selection == windows[i]))
4786 continue; 4783 continue;
4787 if (_e_comp_x_client_find_by_window(windows[i])) 4784 if (_e_comp_x_client_find_by_window(windows[i]))
4788 continue; 4785 continue;
@@ -4949,14 +4946,14 @@ _e_comp_x_desklock_show(void)
4949 Ecore_X_Window win; 4946 Ecore_X_Window win;
4950 4947
4951 win = e_comp->x_comp_data->lock_win = 4948 win = e_comp->x_comp_data->lock_win =
4952 ecore_x_window_input_new(e_comp->man->root, 0, 0, 1, 1); 4949 ecore_x_window_input_new(e_comp->root, 0, 0, 1, 1);
4953 ecore_x_window_show(win); 4950 ecore_x_window_show(win);
4954 if (!e_grabinput_get(win, 0, win)) 4951 if (!e_grabinput_get(win, 0, win))
4955 { 4952 {
4956 Ecore_X_Window *windows; 4953 Ecore_X_Window *windows;
4957 int wnum, i; 4954 int wnum, i;
4958 4955
4959 windows = ecore_x_window_children_get(e_comp->man->root, &wnum); 4956 windows = ecore_x_window_children_get(e_comp->root, &wnum);
4960 if (!windows) goto fail; 4957 if (!windows) goto fail;
4961 for (i = 0; i < wnum; i++) 4958 for (i = 0; i < wnum; i++)
4962 { 4959 {
@@ -5027,7 +5024,7 @@ _e_comp_x_setup(Ecore_X_Window root, int w, int h)
5027 "This is needed for Enlightenment to function.")); 5024 "This is needed for Enlightenment to function."));
5028 return EINA_FALSE; 5025 return EINA_FALSE;
5029 } 5026 }
5030 e_comp->man = e_manager_new(root, e_comp, w, h); 5027 e_comp->root = root;
5031 5028
5032 memset((&att), 0, sizeof(Ecore_X_Window_Attributes)); 5029 memset((&att), 0, sizeof(Ecore_X_Window_Attributes));
5033 ecore_x_window_attributes_get(e_comp->win, &att); 5030 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)
5120 e_comp->bindings_grab_cb = _e_comp_x_bindings_grab_cb; 5117 e_comp->bindings_grab_cb = _e_comp_x_bindings_grab_cb;
5121 e_comp->bindings_ungrab_cb = _e_comp_x_bindings_ungrab_cb; 5118 e_comp->bindings_ungrab_cb = _e_comp_x_bindings_ungrab_cb;
5122 5119
5123 if (!e_comp_canvas_init()) return EINA_FALSE; 5120 if (!e_comp_canvas_init(w, h)) return EINA_FALSE;
5124 5121
5125 e_grabinput_focus(e_comp->ee_win, E_FOCUS_METHOD_PASSIVE); 5122 e_grabinput_focus(e_comp->ee_win, E_FOCUS_METHOD_PASSIVE);
5126 5123
@@ -5151,7 +5148,7 @@ _e_comp_x_setup(Ecore_X_Window root, int w, int h)
5151 ecore_x_window_lower(e_comp->layers[i].win); 5148 ecore_x_window_lower(e_comp->layers[i].win);
5152 5149
5153 ecore_evas_lower(e_comp->ee); 5150 ecore_evas_lower(e_comp->ee);
5154 e_comp->pointer = e_pointer_window_new(e_comp->man->root, 0); 5151 e_comp->pointer = e_pointer_window_new(e_comp->root, 0);
5155 e_comp->pointer->color = ecore_x_cursor_color_supported_get(); 5152 e_comp->pointer->color = ecore_x_cursor_color_supported_get();
5156 e_pointer_type_push(e_comp->pointer, e_comp->pointer, "default"); 5153 e_pointer_type_push(e_comp->pointer, e_comp->pointer, "default");
5157 _e_comp_x_manage_windows(); 5154 _e_comp_x_manage_windows();
@@ -5374,6 +5371,6 @@ e_comp_x_nocomp_end(void)
5374{ 5371{
5375 e_comp->nocomp = 0; 5372 e_comp->nocomp = 0;
5376 ecore_x_window_show(e_comp->win); 5373 ecore_x_window_show(e_comp->win);
5377 ecore_x_composite_redirect_subwindows(e_comp->man->root, ECORE_X_COMPOSITE_UPDATE_MANUAL); 5374 ecore_x_composite_redirect_subwindows(e_comp->root, ECORE_X_COMPOSITE_UPDATE_MANUAL);
5378 _e_comp_x_focus_check(); 5375 _e_comp_x_focus_check();
5379} 5376}
diff --git a/src/bin/e_desk.c b/src/bin/e_desk.c
index 84a1718..75150ea 100644
--- a/src/bin/e_desk.c
+++ b/src/bin/e_desk.c
@@ -908,10 +908,6 @@ static void
908_e_desk_window_profile_change_protocol_set(void) 908_e_desk_window_profile_change_protocol_set(void)
909{ 909{
910#ifndef HAVE_WAYLAND_ONLY 910#ifndef HAVE_WAYLAND_ONLY
911 Eina_List *l = NULL; 911 ecore_x_e_window_profile_supported_set(e_comp->root, e_config->use_desktop_window_profile);
912 E_Manager *man;
913
914 EINA_LIST_FOREACH(e_manager_list(), l, man)
915 ecore_x_e_window_profile_supported_set(man->root, e_config->use_desktop_window_profile);
916#endif 912#endif
917} 913}
diff --git a/src/bin/e_desklock.c b/src/bin/e_desklock.c
index c3091fa..a9c1eb5 100644
--- a/src/bin/e_desklock.c
+++ b/src/bin/e_desklock.c
@@ -268,7 +268,7 @@ e_desklock_show(Eina_Bool suspend)
268 o = evas_object_rectangle_add(e_comp->evas); 268 o = evas_object_rectangle_add(e_comp->evas);
269 block_rects = eina_list_append(block_rects, o); 269 block_rects = eina_list_append(block_rects, o);
270 evas_object_color_set(o, 0, 0, 0, 255); 270 evas_object_color_set(o, 0, 0, 0, 255);
271 evas_object_resize(o, e_comp->man->w, e_comp->man->h); 271 evas_object_resize(o, e_comp->w, e_comp->h);
272 evas_object_layer_set(o, E_LAYER_DESKLOCK); 272 evas_object_layer_set(o, E_LAYER_DESKLOCK);
273 evas_object_show(o); 273 evas_object_show(o);
274 } 274 }
diff --git a/src/bin/e_dnd.c b/src/bin/e_dnd.c
index 61ddde2..a3768a7 100644
--- a/src/bin/e_dnd.c
+++ b/src/bin/e_dnd.c
@@ -210,7 +210,7 @@ e_drag_new(int x, int y,
210 ecore_x_window_shadow_tree_flush(); 210 ecore_x_window_shadow_tree_flush();
211#endif 211#endif
212 212
213 _drag_win_root = e_comp->man->root; 213 _drag_win_root = e_comp->root;
214 214
215 drag->cb.key_down = NULL; 215 drag->cb.key_down = NULL;
216 drag->cb.key_up = NULL; 216 drag->cb.key_up = NULL;
@@ -275,13 +275,13 @@ e_drag_start(E_Drag *drag, int x, int y)
275 if (_drag_win) return 0; 275 if (_drag_win) return 0;
276#ifndef HAVE_WAYLAND_ONLY 276#ifndef HAVE_WAYLAND_ONLY
277 _drag_win = ecore_x_window_input_new(e_comp->win, 277 _drag_win = ecore_x_window_input_new(e_comp->win,
278 e_comp->man->x, e_comp->man->y, 278 e_comp->x, e_comp->y,
279 e_comp->man->w, e_comp->man->h); 279 e_comp->w, e_comp->h);
280 ecore_event_window_register(_drag_win, e_comp->ee, e_comp->evas, 280 ecore_event_window_register(_drag_win, e_comp->ee, e_comp->evas,
281 NULL, NULL, NULL, NULL); 281 NULL, NULL, NULL, NULL);
282 ecore_x_window_show(_drag_win); 282 ecore_x_window_show(_drag_win);
283#endif 283#endif
284 _drag_win_root = e_comp->man->root; 284 _drag_win_root = e_comp->root;
285 if (!e_grabinput_get(_drag_win, 1, _drag_win)) 285 if (!e_grabinput_get(_drag_win, 1, _drag_win))
286 { 286 {
287#ifndef HAVE_WAYLAND_ONLY 287#ifndef HAVE_WAYLAND_ONLY
@@ -341,8 +341,8 @@ e_drag_xdnd_start(E_Drag *drag, int x, int y)
341#ifndef HAVE_WAYLAND_ONLY 341#ifndef HAVE_WAYLAND_ONLY
342 if (e_comp->comp_type != E_PIXMAP_TYPE_X) return 0; 342 if (e_comp->comp_type != E_PIXMAP_TYPE_X) return 0;
343 _drag_win = ecore_x_window_input_new(e_comp->win, 343 _drag_win = ecore_x_window_input_new(e_comp->win,
344 e_comp->man->x, e_comp->man->y, 344 e_comp->x, e_comp->y,
345 e_comp->man->w, e_comp->man->h); 345 e_comp->w, e_comp->h);
346 346
347 ecore_x_window_show(_drag_win); 347 ecore_x_window_show(_drag_win);
348#endif 348#endif
diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c
index fe19ee8..b857276 100644
--- a/src/bin/e_fm.c
+++ b/src/bin/e_fm.c
@@ -3039,18 +3039,17 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
3039 if (e_config->device_auto_open && !eina_list_count(v->mounts)) 3039 if (e_config->device_auto_open && !eina_list_count(v->mounts))
3040 { 3040 {
3041 E_Action *a; 3041 E_Action *a;
3042 Eina_List *m;
3043 unsigned int count; 3042 unsigned int count;
3044 3043
3045 a = e_action_find("fileman"); 3044 a = e_action_find("fileman");
3046 m = e_manager_list();
3047 count = eina_list_count(_e_fm2_list); 3045 count = eina_list_count(_e_fm2_list);
3048 if (a && a->func.go && m && eina_list_data_get(m) && mountpoint) 3046 if (a && a->func.go && mountpoint)
3049 { 3047 {
3050 Evas_Object *fm; 3048 Evas_Object *fm;
3049 Eina_List *m;
3051 Eina_Bool auto_unmount = v->auto_unmount; 3050 Eina_Bool auto_unmount = v->auto_unmount;
3052 3051
3053 a->func.go(E_OBJECT(eina_list_data_get(m)), mountpoint); 3052 a->func.go(E_OBJECT(e_comp), mountpoint);
3054 if (count == eina_list_count(_e_fm2_list)) break; 3053 if (count == eina_list_count(_e_fm2_list)) break;
3055 EINA_LIST_REVERSE_FOREACH(_e_fm2_list, m, fm) 3054 EINA_LIST_REVERSE_FOREACH(_e_fm2_list, m, fm)
3056 { 3055 {
diff --git a/src/bin/e_grab_dialog.c b/src/bin/e_grab_dialog.c
index 57fcf19..ee1657f 100644
--- a/src/bin/e_grab_dialog.c
+++ b/src/bin/e_grab_dialog.c
@@ -130,7 +130,7 @@ e_grab_dialog_show(Evas_Object *parent, Eina_Bool is_mouse, Ecore_Event_Handler_
130 evas_object_event_callback_add(eg->dia->win, EVAS_CALLBACK_DEL, _e_grab_dialog_delete, eg); 130 evas_object_event_callback_add(eg->dia->win, EVAS_CALLBACK_DEL, _e_grab_dialog_delete, eg);
131 131
132#ifndef HAVE_WAYLAND_ONLY 132#ifndef HAVE_WAYLAND_ONLY
133 eg->grab_win = ecore_x_window_input_new(e_comp->man->root, 0, 0, 1, 1); 133 eg->grab_win = ecore_x_window_input_new(e_comp->root, 0, 0, 1, 1);
134 ecore_x_window_show(eg->grab_win); 134 ecore_x_window_show(eg->grab_win);
135 e_grabinput_get(eg->grab_win, 0, eg->grab_win); 135 e_grabinput_get(eg->grab_win, 0, eg->grab_win);
136#endif 136#endif
diff --git a/src/bin/e_hints.c b/src/bin/e_hints.c
index 51fe329..443d1c2 100644
--- a/src/bin/e_hints.c
+++ b/src/bin/e_hints.c
@@ -299,31 +299,25 @@ e_hints_client_list_set(void)
299{ 299{
300#ifdef HAVE_WAYLAND_ONLY 300#ifdef HAVE_WAYLAND_ONLY
301#else 301#else
302 E_Manager *man;
303 const Eina_List *l;
304
305 /* Get client count by adding client lists on all containers */ 302 /* Get client count by adding client lists on all containers */
306 EINA_LIST_FOREACH(e_manager_list(), l, man) 303 unsigned int i = 0;
304 Ecore_X_Window *clients = NULL;
305
306 if (e_comp->comp_type != E_PIXMAP_TYPE_X) return;
307 if (e_comp->clients)
307 { 308 {
308 unsigned int i = 0; 309 E_Client *ec;
309 Ecore_X_Window *clients = NULL; 310 const Eina_List *ll;
310 311
311 if (man->comp->comp_type != E_PIXMAP_TYPE_X) continue; 312 clients = calloc(e_clients_count(), sizeof(Ecore_X_Window));
312 if (man->comp->clients) 313 EINA_LIST_FOREACH(e_comp->clients, ll, ec)
313 { 314 {
314 E_Client *ec; 315 if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_X) continue;
315 const Eina_List *ll; 316 clients[i++] = e_client_util_win_get(ec);
316
317 clients = calloc(e_clients_count(), sizeof(Ecore_X_Window));
318 EINA_LIST_FOREACH(man->comp->clients, ll, ec)
319 {
320 if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_X) continue;
321 clients[i++] = e_client_util_win_get(ec);
322 }
323 } 317 }
324 ecore_x_netwm_client_list_set(man->root, clients, i);
325 free(clients);
326 } 318 }
319 ecore_x_netwm_client_list_set(e_comp->root, clients, i);
320 free(clients);
327#endif 321#endif
328} 322}
329 323
@@ -383,25 +377,22 @@ e_hints_client_stacking_set(void)
383 * to be returned in the list 377 * to be returned in the list
384 */ 378 */
385 if (i <= c) 379 if (i <= c)
386 ecore_x_netwm_client_list_stacking_set(e_comp->man->root, clients, c); 380 ecore_x_netwm_client_list_stacking_set(e_comp->root, clients, c);
387 free(clients); 381 free(clients);
388#endif 382#endif
389} 383}
390 384
391EAPI void 385EAPI void
392e_hints_active_window_set(E_Manager *man, 386e_hints_active_window_set(E_Client *ec)
393 E_Client *ec)
394{ 387{
395#ifdef HAVE_WAYLAND_ONLY 388#ifdef HAVE_WAYLAND_ONLY
396 (void)man;
397 (void)ec; 389 (void)ec;
398#else 390#else
399 E_OBJECT_CHECK(man);
400 if (e_comp->comp_type != E_PIXMAP_TYPE_X) return; 391 if (e_comp->comp_type != E_PIXMAP_TYPE_X) return;
401 if (ec && (e_pixmap_type_get(ec->pixmap) == E_PIXMAP_TYPE_X)) 392 if (ec && (e_pixmap_type_get(ec->pixmap) == E_PIXMAP_TYPE_X))
402 ecore_x_netwm_client_active_set(man->root, e_client_util_win_get(ec)); 393 ecore_x_netwm_client_active_set(e_comp->root, e_client_util_win_get(ec));
403 else 394 else
404 ecore_x_netwm_client_active_set(man->root, 0); 395 ecore_x_netwm_client_active_set(e_comp->root, 0);
405#endif 396#endif
406} 397}
407 398
@@ -1674,8 +1665,8 @@ e_hints_scale_update(void)
1674#else 1665#else
1675 unsigned int scale = e_scale * 1000; 1666 unsigned int scale = e_scale * 1000;
1676 1667
1677 if (e_comp->man->root) 1668 if (e_comp->root)
1678 ecore_x_window_prop_card32_set(e_comp->man->root, ATM_ENLIGHTENMENT_SCALE, &scale, 1); 1669 ecore_x_window_prop_card32_set(e_comp->root, ATM_ENLIGHTENMENT_SCALE, &scale, 1);
1679#endif 1670#endif
1680} 1671}
1681 1672
diff --git a/src/bin/e_hints.h b/src/bin/e_hints.h
index a0c5f9a..72f3385 100644
--- a/src/bin/e_hints.h
+++ b/src/bin/e_hints.h
@@ -4,11 +4,11 @@
4#define E_HINTS_H 4#define E_HINTS_H
5 5
6EINTERN void e_hints_init(Ecore_Window win, Ecore_Window propwin); 6EINTERN void e_hints_init(Ecore_Window win, Ecore_Window propwin);
7EINTERN void e_hints_manager_init(E_Manager *man); 7//EINTERN void e_hints_manager_init(E_Manager *man);
8EAPI void e_hints_client_list_set(void); 8EAPI void e_hints_client_list_set(void);
9EAPI void e_hints_client_stacking_set(void); 9EAPI void e_hints_client_stacking_set(void);
10 10
11EAPI void e_hints_active_window_set(E_Manager *man, E_Client *ec); 11EAPI void e_hints_active_window_set(E_Client *ec);
12 12
13EINTERN void e_hints_window_init(E_Client *ec); 13EINTERN void e_hints_window_init(E_Client *ec);
14EAPI void e_hints_window_state_set(E_Client *ec); 14EAPI void e_hints_window_state_set(E_Client *ec);
diff --git a/src/bin/e_includes.h b/src/bin/e_includes.h
index 832a7d2..f6f104b 100644
--- a/src/bin/e_includes.h
+++ b/src/bin/e_includes.h
@@ -1,7 +1,6 @@
1#include "e_mmx.h" 1#include "e_mmx.h"
2#include "e_object.h" 2#include "e_object.h"
3#include "e_user.h" 3#include "e_user.h"
4#include "e_manager.h"
5#include "e_path.h" 4#include "e_path.h"
6#include "e_ipc.h" 5#include "e_ipc.h"
7#include "e_error.h" 6#include "e_error.h"
diff --git a/src/bin/e_int_client_menu.c b/src/bin/e_int_client_menu.c
index 64abe02..eb8f6b6 100644
--- a/src/bin/e_int_client_menu.c
+++ b/src/bin/e_int_client_menu.c
@@ -969,7 +969,7 @@ _e_client_menu_cb_align_setup(E_Client *ec, Evas_Object_Event_Cb cb)
969 e_notification_client_send(&n, NULL, NULL); 969 e_notification_client_send(&n, NULL, NULL);
970 970
971 o = evas_object_rectangle_add(e_comp->evas); 971 o = evas_object_rectangle_add(e_comp->evas);
972 evas_object_resize(o, e_comp->man->w, e_comp->man->h); 972 evas_object_resize(o, e_comp->w, e_comp->h);
973 evas_object_color_set(o, 0, 0, 0, 0); 973 evas_object_color_set(o, 0, 0, 0, 0);
974 evas_object_layer_set(o, E_LAYER_POPUP); 974 evas_object_layer_set(o, E_LAYER_POPUP);
975 evas_object_show(o); 975 evas_object_show(o);
diff --git a/src/bin/e_ipc.c b/src/bin/e_ipc.c
index d5fddd9..4cdf4ba 100644
--- a/src/bin/e_ipc.c
+++ b/src/bin/e_ipc.c
@@ -190,24 +190,15 @@ _e_ipc_cb_client_data(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
190 190
191 if (e_ipc_codec_2str_dec(e->data, e->size, &req)) 191 if (e_ipc_codec_2str_dec(e->data, e->size, &req))
192 { 192 {
193 Eina_List *m = e_manager_list();
194 int len, ok = 0; 193 int len, ok = 0;
195 void *d; 194 void *d;
196 195
197 if (m) 196 E_Action *act = e_action_find(req->str1);
197
198 if ((act) && (act->func.go))
198 { 199 {
199 E_Manager *man = eina_list_data_get(m); 200 act->func.go(E_OBJECT(e_comp), req->str2);
200 201 ok = 1;
201 if (man)
202 {
203 E_Action *act = e_action_find(req->str1);
204
205 if ((act) && (act->func.go))
206 {
207 act->func.go(E_OBJECT(man), req->str2);
208 ok = 1;
209 }
210 }
211 } 202 }
212 203
213 d = e_ipc_codec_int_enc(ok, &len); 204 d = e_ipc_codec_int_enc(ok, &len);
diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index 10fe41e..05e634d 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -992,9 +992,9 @@ main(int argc, char **argv)
992 _idle_flush = ecore_idle_enterer_add(_e_main_cb_x_flusher, NULL); 992 _idle_flush = ecore_idle_enterer_add(_e_main_cb_x_flusher, NULL);
993 TS("Add Idler For X Flush Done"); 993 TS("Add Idler For X Flush Done");
994 994
995 TS("E_Manager Keys Grab"); 995 TS("E_Comp_Canvas Keys Grab");
996 e_managers_keys_grab(); 996 e_comp_canvas_keys_grab();
997 TS("E_Manager Keys Grab Done"); 997 TS("E_Comp_Canvas Keys Grab Done");
998 998
999 if (e_config->show_splash) 999 if (e_config->show_splash)
1000 e_init_status_set(_("Load Modules")); 1000 e_init_status_set(_("Load Modules"));
@@ -1564,9 +1564,6 @@ _e_main_test_formats(void)
1564static int 1564static int
1565_e_main_screens_init(void) 1565_e_main_screens_init(void)
1566{ 1566{
1567 TS("\tscreens: manager");
1568 if (!e_manager_init()) return 0;
1569
1570 TS("\tscreens: client"); 1567 TS("\tscreens: client");
1571 if (!e_client_init()) return 0; 1568 if (!e_client_init()) return 0;
1572 TS("\tscreens: win"); 1569 TS("\tscreens: win");
@@ -1620,7 +1617,6 @@ _e_main_screens_shutdown(void)
1620 1617
1621 e_desk_shutdown(); 1618 e_desk_shutdown();
1622 e_zone_shutdown(); 1619 e_zone_shutdown();
1623 e_manager_shutdown();
1624 return 1; 1620 return 1;
1625} 1621}
1626 1622
diff --git a/src/bin/e_manager.c b/src/bin/e_manager.c
deleted file mode 100644
index d00eb4f..0000000
--- a/src/bin/e_manager.c
+++ /dev/null
@@ -1,204 +0,0 @@
1#include "e.h"
2
3EAPI int E_EVENT_MANAGER_KEYS_GRAB = -1;
4
5static Eina_List *managers = NULL;
6
7static Ecore_Timer *timer_post_screensaver_lock = NULL;
8
9static void
10_e_manager_free(E_Manager *man)
11{
12 E_FREE_LIST(man->handlers, ecore_event_handler_del);
13 managers = eina_list_remove(managers, man);
14 free(man);
15}
16
17static Eina_Bool
18_e_manager_cb_key_down(void *data, int ev_type EINA_UNUSED, Ecore_Event_Key *ev)
19{
20 E_Manager *man = data;
21
22 if (ev->event_window != man->root)
23 {
24 E_Client *ec;
25
26 ec = e_client_focused_get();
27 /* *block actions when no client is focused (probably something else did a grab here so we'll play nice)
28 * *block actions when client menu is up
29 * *block actions when event (grab) window isn't comp window
30 * *other cases?
31 */
32 if (!ec) return ECORE_CALLBACK_RENEW;
33 if ((ec->border_menu) || (ev->event_window != man->comp->ee_win))
34 return ECORE_CALLBACK_PASS_ON;
35 }
36 if (ev->root_window != man->root) man = e_manager_find_by_root(ev->root_window);
37 if (!man) man = eina_list_data_get(managers);
38 return !e_bindings_key_down_event_handle(E_BINDING_CONTEXT_MANAGER, E_OBJECT(man), ev);
39}
40
41static Eina_Bool
42_e_manager_cb_key_up(void *data, int ev_type EINA_UNUSED, Ecore_Event_Key *ev)
43{
44 E_Manager *man = data;
45
46 if (ev->event_window != man->root) return ECORE_CALLBACK_PASS_ON;
47 if (ev->root_window != man->root) man = e_manager_find_by_root(ev->root_window);
48 if (!man) man = eina_list_data_get(managers);
49 return !e_bindings_key_up_event_handle(E_BINDING_CONTEXT_MANAGER, E_OBJECT(man), ev);
50}
51
52static Eina_Bool
53_e_manager_cb_timer_post_screensaver_lock(void *data EINA_UNUSED)
54{
55 e_desklock_show_autolocked();
56 timer_post_screensaver_lock = NULL;
57 return ECORE_CALLBACK_CANCEL;
58}
59
60static Eina_Bool
61_e_manager_cb_screensaver_on(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *ev EINA_UNUSED)
62{
63 if (e_config->desklock_autolock_screensaver)
64 {
65 E_FREE_FUNC(timer_post_screensaver_lock, ecore_timer_del);
66 if (e_config->desklock_post_screensaver_time <= 1.0)
67 e_desklock_show_autolocked();
68 else
69 timer_post_screensaver_lock = ecore_timer_add
70 (e_config->desklock_post_screensaver_time,
71 _e_manager_cb_timer_post_screensaver_lock, NULL);
72 }
73 return ECORE_CALLBACK_PASS_ON;
74}
75
76static Eina_Bool
77_e_manager_cb_screensaver_off(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *ev EINA_UNUSED)
78{
79 E_FREE_FUNC(timer_post_screensaver_lock, ecore_timer_del);
80 return ECORE_CALLBACK_PASS_ON;
81}
82
83/* externally accessible functions */
84EINTERN int
85e_manager_init(void)
86{
87 E_EVENT_MANAGER_KEYS_GRAB = ecore_event_type_new();
88 return 1;
89}
90
91EINTERN int
92e_manager_shutdown(void)
93{
94 E_FREE_LIST(managers, e_object_del);
95 E_FREE_FUNC(timer_post_screensaver_lock, ecore_timer_del);
96
97 return 1;
98}
99
100EAPI Eina_List *
101e_manager_list(void)
102{
103 return managers;
104}
105
106EAPI E_Manager *
107e_manager_new(Ecore_Window root, E_Comp *c, int w, int h)
108{
109 E_Manager *man;
110
111 man = E_OBJECT_ALLOC(E_Manager, E_MANAGER_TYPE, _e_manager_free);
112 if (!man) return NULL;
113 man->root = root;
114 man->num = c->num;
115 man->w = w;
116 man->h = h;
117 man->comp = c;
118
119 managers = eina_list_append(managers, man);
120
121 E_LIST_HANDLER_APPEND(man->handlers, ECORE_EVENT_KEY_DOWN,
122 _e_manager_cb_key_down, man);
123 E_LIST_HANDLER_APPEND(man->handlers, ECORE_EVENT_KEY_UP,
124 _e_manager_cb_key_up, man);
125 E_LIST_HANDLER_APPEND(man->handlers, E_EVENT_SCREENSAVER_ON,
126 _e_manager_cb_screensaver_on, man);
127 E_LIST_HANDLER_APPEND(man->handlers, E_EVENT_SCREENSAVER_OFF,
128 _e_manager_cb_screensaver_off, man);
129
130 return man;
131}
132
133EAPI void
134e_manager_resize(E_Manager *man, int w, int h)
135{
136 E_OBJECT_CHECK(man);
137 E_OBJECT_TYPE_CHECK(man, E_MANAGER_TYPE);
138 man->w = w;
139 man->h = h;
140 ecore_evas_resize(man->comp->ee, w, h);
141}
142
143EAPI E_Manager *
144e_manager_current_get(void)
145{
146 Eina_List *l;
147 E_Manager *man;
148 int x, y;
149
150 if (!managers) return NULL;
151 if (eina_list_count(managers) == 1)
152 return eina_list_data_get(managers);
153 EINA_LIST_FOREACH(managers, l, man)
154 {
155 ecore_evas_pointer_xy_get(man->comp->ee, &x, &y);
156 if (x == -1 && y == -1)
157 continue;
158 if (E_INSIDE(x, y, man->x, man->y, man->w, man->h))
159 return man;
160 }
161 return eina_list_data_get(managers);
162}
163
164EAPI E_Manager *
165e_manager_number_get(int num)
166{
167 Eina_List *l;
168 E_Manager *man;
169
170 if (!managers) return NULL;
171 EINA_LIST_FOREACH(managers, l, man)
172 {
173 if (man->num == num)
174 return man;
175 }
176 return NULL;
177}
178
179EAPI void
180e_managers_keys_grab(void)
181{
182 Eina_List *l;
183 E_Manager *man;
184
185 EINA_LIST_FOREACH(managers, l, man)
186 {
187 if (man->root)
188 e_bindings_key_grab(E_BINDING_CONTEXT_ANY, man->root);
189 }
190 ecore_event_add(E_EVENT_MANAGER_KEYS_GRAB, NULL, NULL, NULL);
191}
192
193EAPI void
194e_managers_keys_ungrab(void)
195{
196 Eina_List *l;
197 E_Manager *man;
198
199 EINA_LIST_FOREACH(managers, l, man)
200 {
201 if (man->root)
202 e_bindings_key_ungrab(E_BINDING_CONTEXT_ANY, man->root);
203 }
204}
diff --git a/src/bin/e_manager.h b/src/bin/e_manager.h
deleted file mode 100644
index 72957d3..0000000
--- a/src/bin/e_manager.h
+++ /dev/null
@@ -1,52 +0,0 @@
1#ifdef E_TYPEDEFS
2
3typedef struct _E_Manager E_Manager;
4
5#else
6#ifndef E_MANAGER_H
7#define E_MANAGER_H
8
9#define E_MANAGER_TYPE (int) 0xE0b01008
10
11extern EAPI int E_EVENT_MANAGER_KEYS_GRAB;
12
13struct _E_Manager
14{
15 E_Object e_obj_inherit;
16
17 int num;
18 int x, y, w, h;
19 Ecore_Window root;
20 Eina_List *handlers;
21
22 E_Comp *comp;
23
24 Eina_Bool visible : 1;
25};
26
27EINTERN int e_manager_init(void);
28EINTERN int e_manager_shutdown(void);
29EAPI Eina_List *e_manager_list(void);
30
31EAPI E_Manager *e_manager_new(Ecore_Window root, E_Comp *c, int w, int h);
32EAPI void e_manager_manage_windows(E_Manager *man);
33EAPI void e_manager_resize(E_Manager *man, int w, int h);
34EAPI E_Manager *e_manager_current_get(void);
35EAPI E_Manager *e_manager_number_get(int num);
36
37EAPI void e_managers_keys_grab(void);
38EAPI void e_managers_keys_ungrab(void);
39
40static inline E_Manager *
41e_manager_find_by_root(Ecore_Window root)
42{
43 Eina_List *l;
44 E_Manager *man;
45
46 EINA_LIST_FOREACH(e_manager_list(), l, man)
47 if (root == man->root) return man;
48 return NULL;
49}
50
51#endif
52#endif
diff --git a/src/bin/e_sys.c b/src/bin/e_sys.c
index 0b28fad..37a568a 100644
--- a/src/bin/e_sys.c
+++ b/src/bin/e_sys.c
@@ -164,7 +164,7 @@ _e_sys_comp_logout(void)
164static void 164static void
165_e_sys_comp_resume(void) 165_e_sys_comp_resume(void)
166{ 166{
167 evas_damage_rectangle_add(e_comp->evas, 0, 0, e_comp->man->w, e_comp->man->h); 167 evas_damage_rectangle_add(e_comp->evas, 0, 0, e_comp->w, e_comp->h);
168 _e_sys_comp_emit_cb_wait(E_SYS_SUSPEND, "e,state,sys,resume", NULL, EINA_FALSE); 168 _e_sys_comp_emit_cb_wait(E_SYS_SUSPEND, "e,state,sys,resume", NULL, EINA_FALSE);
169 e_screensaver_deactivate(); 169 e_screensaver_deactivate();
170} 170}
diff --git a/src/bin/e_test.c b/src/bin/e_test.c
index 0951fa0..6ac89bc 100644
--- a/src/bin/e_test.c
+++ b/src/bin/e_test.c
@@ -42,8 +42,6 @@ static int
42_e_test_timer(void *data) 42_e_test_timer(void *data)
43{ 43{
44 E_Menu *m; 44 E_Menu *m;
45 Eina_List *managers, *l;
46 E_Manager *man;
47 45
48 m = data; 46 m = data;
49 if (m) 47 if (m)
@@ -53,16 +51,11 @@ _e_test_timer(void *data)
53 ecore_timer_add(0.05, _e_test_timer, NULL); 51 ecore_timer_add(0.05, _e_test_timer, NULL);
54 return 0; 52 return 0;
55 } 53 }
56 managers = e_manager_list(); 54 m = e_int_menus_main_new();
57 EINA_LIST_FOREACH(managers, l, man) 55 e_menu_activate_mouse(m,
58 { 56 eina_list_data_get(e_comp->zones),
59 m = e_int_menus_main_new(); 57 0, 0, 1, 1, E_MENU_POP_DIRECTION_DOWN, 0);
60 e_menu_activate_mouse(m, 58 ecore_timer_add(0.05, _e_test_timer, m);
61 eina_list_data_get(man->comp->zones),
62 0, 0, 1, 1, E_MENU_POP_DIRECTION_DOWN, 0);
63 ecore_timer_add(0.05, _e_test_timer, m);
64 return 0;
65 }
66 return 0; 59 return 0;
67} 60}
68 61
@@ -133,17 +126,12 @@ static void
133_e_test_internal(void) 126_e_test_internal(void)
134{ 127{
135 E_Menu *m; 128 E_Menu *m;
136 Eina_List *l;
137 E_Manager *man;
138 129
139 EINA_LIST_FOREACH(e_manager_list(), l, man) 130 m = e_int_menus_main_new();
140 { 131 e_menu_activate_mouse(m,
141 m = e_int_menus_main_new(); 132 eina_list_data_get(e_comp->zones),
142 e_menu_activate_mouse(m, 133 0, 0, 1, 1, E_MENU_POP_DIRECTION_DOWN, 0);
143 eina_list_data_get(man->comp->zones), 134 ecore_timer_add(0.02, _e_test_timer, m);
144 0, 0, 1, 1, E_MENU_POP_DIRECTION_DOWN, 0);
145 ecore_timer_add(0.02, _e_test_timer, m);
146 }
147} 135}
148 136
149#elif 0 137#elif 0
diff --git a/src/bin/e_xsettings.c b/src/bin/e_xsettings.c
index 4815d3b..42db400 100644
--- a/src/bin/e_xsettings.c
+++ b/src/bin/e_xsettings.c
@@ -23,7 +23,6 @@ typedef struct _Setting Setting;
23 23
24struct _Settings_Manager 24struct _Settings_Manager
25{ 25{
26 E_Manager *man;
27 Ecore_X_Window selection; 26 Ecore_X_Window selection;
28 Ecore_Timer *timer_retry; 27 Ecore_Timer *timer_retry;
29 unsigned long serial; 28 unsigned long serial;
@@ -60,7 +59,7 @@ static Ecore_X_Atom _atom_manager = 0;
60static Ecore_X_Atom _atom_xsettings = 0; 59static Ecore_X_Atom _atom_xsettings = 0;
61static Ecore_X_Atom _atom_gtk_iconthemes = 0; 60static Ecore_X_Atom _atom_gtk_iconthemes = 0;
62static Ecore_X_Atom _atom_gtk_rcfiles = 0; 61static Ecore_X_Atom _atom_gtk_rcfiles = 0;
63static Eina_List *managers = NULL; 62static Settings_Manager *manager = NULL;
64static Eina_List *settings = NULL; 63static Eina_List *settings = NULL;
65static Eina_Bool running = EINA_FALSE; 64static Eina_Bool running = EINA_FALSE;
66static Eio_File *eio_op = NULL; 65static Eio_File *eio_op = NULL;
@@ -84,22 +83,22 @@ _e_xsettings_atom_screen_get(int screen_num)
84} 83}
85 84
86static Eina_Bool 85static Eina_Bool
87_e_xsettings_selection_owner_set(Settings_Manager *sm) 86_e_xsettings_selection_owner_set(void)
88{ 87{
89 Ecore_X_Atom atom; 88 Ecore_X_Atom atom;
90 Ecore_X_Window cur_selection; 89 Ecore_X_Window cur_selection;
91 Eina_Bool ret; 90 Eina_Bool ret;
92 91
93 atom = _e_xsettings_atom_screen_get(sm->man->num); 92 atom = _e_xsettings_atom_screen_get(0);
94 ecore_x_selection_owner_set(sm->man->comp->cm_selection, atom, 93 ecore_x_selection_owner_set(e_comp->cm_selection, atom,
95 ecore_x_current_time_get()); 94 ecore_x_current_time_get());
96 ecore_x_sync(); 95 ecore_x_sync();
97 cur_selection = ecore_x_selection_owner_get(atom); 96 cur_selection = ecore_x_selection_owner_get(atom);
98 97
99 ret = (cur_selection == sm->man->comp->cm_selection); 98 ret = (cur_selection == e_comp->cm_selection);
100 if (!ret) 99 if (!ret)
101 ERR("XSETTINGS: tried to set selection to %#x, but got %#x", 100 ERR("XSETTINGS: tried to set selection to %#x, but got %#x",
102 (unsigned int)sm->man->comp->cm_selection, cur_selection); 101 (unsigned int)e_comp->cm_selection, cur_selection);
103 102
104 return ret; 103 return ret;
105} 104}
@@ -109,7 +108,7 @@ _e_xsettings_deactivate(Settings_Manager *sm)
109{ 108{
110 Ecore_X_Atom atom; 109 Ecore_X_Atom atom;
111 110
112 atom = _e_xsettings_atom_screen_get(sm->man->num); 111 atom = _e_xsettings_atom_screen_get(0);
113 ecore_x_selection_owner_set(0, atom, ecore_x_current_time_get()); 112 ecore_x_selection_owner_set(0, atom, ecore_x_current_time_get());
114 ecore_x_sync(); 113 ecore_x_sync();
115 sm->enabled = 0; 114 sm->enabled = 0;
@@ -123,17 +122,17 @@ _e_xsettings_activate(Settings_Manager *sm)
123 122
124 if (sm->enabled) return 1; 123 if (sm->enabled) return 1;
125 124
126 atom = _e_xsettings_atom_screen_get(sm->man->num); 125 atom = _e_xsettings_atom_screen_get(0);
127 old_win = ecore_x_selection_owner_get(atom); 126 old_win = ecore_x_selection_owner_get(atom);
128 if (old_win != 0) return 0; 127 if (old_win != 0) return 0;
129 128
130 if (!_e_xsettings_selection_owner_set(sm)) 129 if (!_e_xsettings_selection_owner_set())
131 return 0; 130 return 0;
132 131
133 ecore_x_client_message32_send(sm->man->root, _atom_manager, 132 ecore_x_client_message32_send(e_comp->root, _atom_manager,
134 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 133 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
135 ecore_x_current_time_get(), atom, 134 ecore_x_current_time_get(), atom,
136 sm->man->comp->cm_selection, 0, 0); 135 e_comp->cm_selection, 0, 0);
137 136
138 if (settings) _e_xsettings_apply(sm); 137 if (settings) _e_xsettings_apply(sm);
139 sm->enabled = 1; 138 sm->enabled = 1;
@@ -353,7 +352,7 @@ _e_xsettings_apply(Settings_Manager *sm)
353 EINA_LIST_FOREACH(settings, l, s) 352 EINA_LIST_FOREACH(settings, l, s)
354 pos = _e_xsettings_copy(pos, s); 353 pos = _e_xsettings_copy(pos, s);
355 354
356 ecore_x_window_prop_property_set(sm->man->comp->cm_selection, 355 ecore_x_window_prop_property_set(e_comp->cm_selection,
357 _atom_xsettings, 356 _atom_xsettings,
358 _atom_xsettings, 357 _atom_xsettings,
359 8, data, len); 358 8, data, len);
@@ -363,11 +362,7 @@ _e_xsettings_apply(Settings_Manager *sm)
363static void 362static void
364_e_xsettings_update(void) 363_e_xsettings_update(void)
365{ 364{
366 Settings_Manager *sm; 365 if (e_comp->cm_selection) _e_xsettings_apply(manager);
367 Eina_List *l;
368
369 EINA_LIST_FOREACH(managers, l, sm)
370 if (sm->man->comp->cm_selection) _e_xsettings_apply(sm);
371} 366}
372 367
373static void 368static void
@@ -585,9 +580,6 @@ _e_xsettings_cursor_path_set(void)
585static void 580static void
586_e_xsettings_start(void) 581_e_xsettings_start(void)
587{ 582{
588 Eina_List *l;
589 E_Manager *man;
590
591 if (running) return; 583 if (running) return;
592 584
593 _e_xsettings_theme_set(); 585 _e_xsettings_theme_set();
@@ -595,16 +587,10 @@ _e_xsettings_start(void)
595 _e_xsettings_font_set(); 587 _e_xsettings_font_set();
596 _e_xsettings_cursor_path_set(); 588 _e_xsettings_cursor_path_set();
597 589
598 EINA_LIST_FOREACH(e_manager_list(), l, man) 590 manager = E_NEW(Settings_Manager, 1);
599 {
600 Settings_Manager *sm = E_NEW(Settings_Manager, 1);
601 sm->man = man;
602 591
603 if (!_e_xsettings_activate(sm)) 592 if (!_e_xsettings_activate(manager))
604 _e_xsettings_retry(sm); 593 _e_xsettings_retry(manager);
605
606 managers = eina_list_append(managers, sm);
607 }
608 594
609 running = EINA_TRUE; 595 running = EINA_TRUE;
610} 596}
@@ -612,21 +598,17 @@ _e_xsettings_start(void)
612static void 598static void
613_e_xsettings_stop(void) 599_e_xsettings_stop(void)
614{ 600{
615 Settings_Manager *sm;
616 Setting *s; 601 Setting *s;
617 602
618 if (!running) return; 603 if (!running) return;
619 604
620 EINA_LIST_FREE(managers, sm) 605 if (manager->timer_retry)
621 { 606 ecore_timer_del(manager->timer_retry);
622 if (sm->timer_retry)
623 ecore_timer_del(sm->timer_retry);
624 607
625 if (!stopping) 608 if (!stopping)
626 _e_xsettings_deactivate(sm); 609 _e_xsettings_deactivate(manager);
627 610
628 E_FREE(sm); 611 E_FREE(manager);
629 }
630 612
631 EINA_LIST_FREE(settings, s) 613 EINA_LIST_FREE(settings, s)
632 { 614 {
diff --git a/src/modules/access/e_mod_main.c b/src/modules/access/e_mod_main.c
index 984b79d..b40eea8 100644
--- a/src/modules/access/e_mod_main.c
+++ b/src/modules/access/e_mod_main.c
@@ -88,7 +88,7 @@ _mouse_in_win_get(Cover *cov, int x, int y)
88 then previous target window which has the highlight object 88 then previous target window which has the highlight object
89 should get the message. how? */ 89 should get the message. how? */
90 target_win = ecore_x_window_shadow_tree_at_xy_with_skip_get 90 target_win = ecore_x_window_shadow_tree_at_xy_with_skip_get
91 (cov->e_comp->man->root, x, y, skip, i); 91 (cov->e_comp->root, x, y, skip, i);
92} 92}
93 93
94static unsigned int 94static unsigned int
@@ -756,7 +756,7 @@ _cover_new(E_Zone *zone)
756 evas_object_show(cov->text); 756 evas_object_show(cov->text);
757 757
758#else 758#else
759 cov->win = ecore_x_window_input_new(e_comp->manager->root, 759 cov->win = ecore_x_window_input_new(e_compager->root,
760 e_comp->x + zone->x, 760 e_comp->x + zone->x,
761 e_comp->y + zone->y, 761 e_comp->y + zone->y,
762 zone->w, zone->h); 762 zone->w, zone->h);
diff --git a/src/modules/conf/e_mod_main.c b/src/modules/conf/e_mod_main.c
index 748501a..ead941c 100644
--- a/src/modules/conf/e_mod_main.c
+++ b/src/modules/conf/e_mod_main.c
@@ -370,9 +370,7 @@ _e_mod_action_conf_cb(E_Object *obj, const char *params)
370 370
371 if (obj) 371 if (obj)
372 { 372 {
373 if (obj->type == E_MANAGER_TYPE) 373 if (obj->type == E_COMP_TYPE)
374 zone = e_zone_current_get();
375 else if (obj->type == E_COMP_TYPE)
376 zone = e_zone_current_get(); 374 zone = e_zone_current_get();
377 else if (obj->type == E_ZONE_TYPE) 375 else if (obj->type == E_ZONE_TYPE)
378 zone = ((E_Zone *)obj); 376 zone = ((E_Zone *)obj);
diff --git a/src/modules/conf_bindings/e_int_config_acpibindings.c b/src/modules/conf_bindings/e_int_config_acpibindings.c
index 4c18a51..fb0039a 100644
--- a/src/modules/conf_bindings/e_int_config_acpibindings.c
+++ b/src/modules/conf_bindings/e_int_config_acpibindings.c
@@ -527,10 +527,7 @@ _cb_add_binding(void *data,
527 elm_win_borderless_set(grab_dlg->win, EINA_TRUE); 527 elm_win_borderless_set(grab_dlg->win, EINA_TRUE);
528 528
529#ifndef HAVE_WAYLAND_ONLY 529#ifndef HAVE_WAYLAND_ONLY
530 E_Manager *man; 530 grab_win = ecore_x_window_input_new(e_comp->root, 0, 0, 1, 1);
531
532 man = e_manager_current_get();
533 grab_win = ecore_x_window_input_new(man->root, 0, 0, 1, 1);
534 ecore_x_window_show(grab_win); 531 ecore_x_window_show(grab_win);
535 e_grabinput_get(grab_win, 0, grab_win); 532 e_grabinput_get(grab_win, 0, grab_win);
536#endif 533#endif
diff --git a/src/modules/conf_bindings/e_int_config_keybindings.c b/src/modules/conf_bindings/e_int_config_keybindings.c
index 2289969..388c054 100644
--- a/src/modules/conf_bindings/e_int_config_keybindings.c
+++ b/src/modules/conf_bindings/e_int_config_keybindings.c
@@ -186,7 +186,7 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED,
186 186
187 _auto_apply_changes(cfdata); 187 _auto_apply_changes(cfdata);
188 188
189 e_managers_keys_ungrab(); 189 e_comp_canvas_keys_ungrab();
190 EINA_LIST_FREE(e_bindings->key_bindings, bi) 190 EINA_LIST_FREE(e_bindings->key_bindings, bi)
191 { 191 {
192 e_bindings_key_del(bi->context, bi->key, bi->modifiers, bi->any_mod, 192 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,
215 e_bindings_key_add(bi->context, bi->key, bi->modifiers, bi->any_mod, 215 e_bindings_key_add(bi->context, bi->key, bi->modifiers, bi->any_mod,
216 bi->action, bi->params); 216 bi->action, bi->params);
217 } 217 }
218 e_managers_keys_grab(); 218 e_comp_canvas_keys_grab();
219 e_config_save_queue(); 219 e_config_save_queue();
220 220
221 return 1; 221 return 1;
diff --git a/src/modules/conf_bindings/e_int_config_mousebindings.c b/src/modules/conf_bindings/e_int_config_mousebindings.c
index fb84a91..4e053fe 100644
--- a/src/modules/conf_bindings/e_int_config_mousebindings.c
+++ b/src/modules/conf_bindings/e_int_config_mousebindings.c
@@ -205,7 +205,7 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata
205 _auto_apply_changes(cfdata); 205 _auto_apply_changes(cfdata);
206 206
207 e_comp_button_bindings_ungrab_all(); 207 e_comp_button_bindings_ungrab_all();
208 e_managers_keys_ungrab(); 208 e_comp_canvas_keys_ungrab();
209 209
210 EINA_LIST_FREE(e_bindings->mouse_bindings, eb) 210 EINA_LIST_FREE(e_bindings->mouse_bindings, eb)
211 { 211 {
@@ -269,7 +269,7 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata
269 bw2->any_mod, bw2->action, bw2->params); 269 bw2->any_mod, bw2->action, bw2->params);
270 } 270 }
271 e_comp_button_bindings_grab_all(); 271 e_comp_button_bindings_grab_all();
272 e_managers_keys_grab(); 272 e_comp_canvas_keys_grab();
273 273
274 e_config_save_queue(); 274 e_config_save_queue();
275 return 1; 275 return 1;
diff --git a/src/modules/conf_randr/e_smart_monitor.c b/src/modules/conf_randr/e_smart_monitor.c
index 93b8949..a44f5e9 100644
--- a/src/modules/conf_randr/e_smart_monitor.c
+++ b/src/modules/conf_randr/e_smart_monitor.c
@@ -57,9 +57,6 @@ struct _E_Smart_Data
57 Evas_Coord vw, vh; 57 Evas_Coord vw, vh;
58 } grid; 58 } grid;
59 59
60 /* manager number */
61 unsigned int man_num;
62
63 /* zone number */ 60 /* zone number */
64 unsigned int zone_num; 61 unsigned int zone_num;
65 62
@@ -320,7 +317,6 @@ void
320e_smart_monitor_background_set(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy) 317e_smart_monitor_background_set(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy)
321{ 318{
322 E_Smart_Data *sd; 319 E_Smart_Data *sd;
323 E_Manager *man;
324 E_Zone *zone; 320 E_Zone *zone;
325 E_Desk *desk; 321 E_Desk *desk;
326 322
@@ -329,10 +325,6 @@ e_smart_monitor_background_set(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy)
329 /* try to get the objects smart data */ 325 /* try to get the objects smart data */
330 if (!(sd = evas_object_smart_data_get(obj))) return; 326 if (!(sd = evas_object_smart_data_get(obj))) return;
331 327
332 /* get the current manager */
333 man = e_manager_current_get();
334 sd->man_num = man->num;
335
336 /* get the zone number */ 328 /* get the zone number */
337 if (!(zone = e_comp_zone_xy_get(dx, dy))) 329 if (!(zone = e_comp_zone_xy_get(dx, dy)))
338 zone = e_zone_current_get(); 330 zone = e_zone_current_get();
@@ -910,9 +902,8 @@ _e_smart_monitor_background_update(void *data, int type EINA_UNUSED, void *event
910 902
911 ev = event; 903 ev = event;
912 904
913 /* check this bg event happened on our manager */ 905 /* check this bg event happened on our zone */
914 if (((ev->manager < 0) || (ev->manager == (int)sd->man_num)) && 906 if ((ev->zone < 0) || (ev->zone == (int)sd->zone_num))
915 ((ev->zone < 0) || (ev->zone == (int)sd->zone_num)))
916 { 907 {
917 /* check this bg event happened on our desktop */ 908 /* check this bg event happened on our desktop */
918 if (((ev->desk_x < 0) || (ev->desk_x == sd->current.x)) && 909 if (((ev->desk_x < 0) || (ev->desk_x == sd->current.x)) &&
diff --git a/src/modules/everything/evry_plug_files.c b/src/modules/everything/evry_plug_files.c
index 4fec177..5b1859d 100644
--- a/src/modules/everything/evry_plug_files.c
+++ b/src/modules/everything/evry_plug_files.c
@@ -1113,7 +1113,6 @@ static int
1113_open_folder_action(Evry_Action *act) 1113_open_folder_action(Evry_Action *act)
1114{ 1114{
1115 E_Action *action; 1115 E_Action *action;
1116 Eina_List *m;
1117 char *dir; 1116 char *dir;
1118 1117
1119 if (!(action = e_action_find("fileman"))) 1118 if (!(action = e_action_find("fileman")))
@@ -1124,18 +1123,16 @@ _open_folder_action(Evry_Action *act)
1124 if (!(evry->file_path_get(file))) 1123 if (!(evry->file_path_get(file)))
1125 return 0; 1124 return 0;
1126 1125
1127 m = e_manager_list();
1128
1129 if (!IS_BROWSEABLE(file)) 1126 if (!IS_BROWSEABLE(file))
1130 { 1127 {
1131 dir = ecore_file_dir_get(file->path); 1128 dir = ecore_file_dir_get(file->path);
1132 if (!dir) return 0; 1129 if (!dir) return 0;
1133 action->func.go(E_OBJECT(m->data), dir); 1130 action->func.go(E_OBJECT(e_comp), dir);
1134 free(dir); 1131 free(dir);
1135 } 1132 }
1136 else 1133 else
1137 { 1134 {
1138 action->func.go(E_OBJECT(m->data), file->path); 1135 action->func.go(E_OBJECT(e_comp), file->path);
1139 } 1136 }
1140 1137
1141 return 1; 1138 return 1;
diff --git a/src/modules/gadman/e_mod_gadman.c b/src/modules/gadman/e_mod_gadman.c
index 60ca6ac..73d61ab 100644
--- a/src/modules/gadman/e_mod_gadman.c
+++ b/src/modules/gadman/e_mod_gadman.c
@@ -113,8 +113,8 @@ gadman_init(E_Module *m)
113 Man->module = m; 113 Man->module = m;
114 gadman_locked = e_module_loading_get(); 114 gadman_locked = e_module_loading_get();
115 Man->comp = e_comp; 115 Man->comp = e_comp;
116 Man->width = Man->comp->man->w; 116 Man->width = e_comp->w;
117 Man->height = Man->comp->man->h; 117 Man->height = e_comp->h;
118 118
119 /* create and register "desktop" location */ 119 /* create and register "desktop" location */
120 location = Man->location[GADMAN_LAYER_BG] = e_gadcon_location_new(_("Desktop"), E_GADCON_SITE_DESKTOP, 120 location = Man->location[GADMAN_LAYER_BG] = e_gadcon_location_new(_("Desktop"), E_GADCON_SITE_DESKTOP,
@@ -649,8 +649,7 @@ gadman_update_bg(void)
649 //THIS IS FOR A NORMAL IMAGE 649 //THIS IS FOR A NORMAL IMAGE
650 obj = evas_object_image_add(Man->comp->evas); 650 obj = evas_object_image_add(Man->comp->evas);
651 evas_object_image_file_set(obj, Man->conf->custom_bg, NULL); 651 evas_object_image_file_set(obj, Man->conf->custom_bg, NULL);
652 evas_object_image_fill_set(obj, 0, 0, Man->comp->man->w, 652 evas_object_image_fill_set(obj, 0, 0, e_comp->w, e_comp->h);
653 Man->comp->man->h);
654 } 653 }
655 edje_object_part_swallow(Man->full_bg, "e.swallow.bg", obj); 654 edje_object_part_swallow(Man->full_bg, "e.swallow.bg", obj);
656 break; 655 break;
@@ -798,7 +797,7 @@ _gadman_overlay_create(void)
798 797
799 /* create full background object */ 798 /* create full background object */
800 Man->full_bg = edje_object_add(Man->comp->evas); 799 Man->full_bg = edje_object_add(Man->comp->evas);
801 evas_object_geometry_set(Man->full_bg, 0, 0, Man->comp->man->w, Man->comp->man->h); 800 evas_object_geometry_set(Man->full_bg, 0, 0, e_comp->w, e_comp->h);
802 e_theme_edje_object_set(Man->full_bg, "base/theme/gadman", 801 e_theme_edje_object_set(Man->full_bg, "base/theme/gadman",
803 "e/gadman/full_bg"); 802 "e/gadman/full_bg");
804 edje_object_signal_callback_add(Man->full_bg, "mouse,down,*", 803 edje_object_signal_callback_add(Man->full_bg, "mouse,down,*",
diff --git a/src/modules/ibar/e_mod_main.c b/src/modules/ibar/e_mod_main.c
index 5346cb8..e5a6540 100644
--- a/src/modules/ibar/e_mod_main.c
+++ b/src/modules/ibar/e_mod_main.c
@@ -1869,7 +1869,7 @@ _ibar_cb_icon_move(void *data, Evas *e, Evas_Object *obj, void *event_info EINA_
1869 if (x < 1) 1869 if (x < 1)
1870 zone = e_comp_zone_xy_get(0, y); 1870 zone = e_comp_zone_xy_get(0, y);
1871 else 1871 else
1872 zone = e_comp_zone_xy_get(e_comp->man->w - 5, y); 1872 zone = e_comp_zone_xy_get(e_comp->w - 5, y);
1873 if (!zone) 1873 if (!zone)
1874 zone = eina_list_data_get(e_comp->zones); 1874 zone = eina_list_data_get(e_comp->zones);
1875 } 1875 }
@@ -2519,12 +2519,9 @@ _ibar_focus_cb_key_down(void *data EINA_UNUSED, int type EINA_UNUSED, void *even
2519static void 2519static void
2520_ibar_go_focus(void) 2520_ibar_go_focus(void)
2521{ 2521{
2522 E_Manager *man;
2523 IBar *b; 2522 IBar *b;
2524 2523
2525 if (_ibar_focus_win) return; 2524 if (_ibar_focus_win) return;
2526 man = e_manager_current_get();
2527 if (!man) return;
2528 _ibar_focus_win = e_comp->ee_win; 2525 _ibar_focus_win = e_comp->ee_win;
2529 if (!e_grabinput_get(0, 0, _ibar_focus_win)) 2526 if (!e_grabinput_get(0, 0, _ibar_focus_win))
2530 { 2527 {
diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c
index 5d28abf..c3f4884 100644
--- a/src/modules/mixer/e_mod_main.c
+++ b/src/modules/mixer/e_mod_main.c
@@ -1348,8 +1348,8 @@ _mixer_actions_register(E_Mixer_Module_Context *ctxt)
1348 ctxt->actions.mute->func.go = _mixer_cb_volume_mute; 1348 ctxt->actions.mute->func.go = _mixer_cb_volume_mute;
1349 e_action_predef_name_set(_e_mixer_Name, _lbl_mute, _act_mute, 1349 e_action_predef_name_set(_e_mixer_Name, _lbl_mute, _act_mute,
1350 NULL, NULL, 0); 1350 NULL, NULL, 0);
1351 e_managers_keys_ungrab(); 1351 e_comp_canvas_keys_ungrab();
1352 e_managers_keys_grab(); 1352 e_comp_canvas_keys_grab();
1353 } 1353 }
1354 } 1354 }
1355} 1355}
@@ -1375,8 +1375,8 @@ _mixer_actions_unregister(E_Mixer_Module_Context *ctxt)
1375 { 1375 {
1376 e_action_predef_name_del(_e_mixer_Name, _lbl_mute); 1376 e_action_predef_name_del(_e_mixer_Name, _lbl_mute);
1377 e_action_del(_act_mute); 1377 e_action_del(_act_mute);
1378 e_managers_keys_ungrab(); 1378 e_comp_canvas_keys_ungrab();
1379 e_managers_keys_grab(); 1379 e_comp_canvas_keys_grab();
1380 ctxt->actions.mute = NULL; 1380 ctxt->actions.mute = NULL;
1381 } 1381 }
1382} 1382}
diff --git a/src/modules/quickaccess/e_mod_quickaccess.c b/src/modules/quickaccess/e_mod_quickaccess.c
index 36a65fc..252ab63 100644
--- a/src/modules/quickaccess/e_mod_quickaccess.c
+++ b/src/modules/quickaccess/e_mod_quickaccess.c
@@ -703,10 +703,10 @@ _grab_key_down_cb(void *data, int type EINA_UNUSED, void *event)
703 bi->action = eina_stringshare_ref(_act_toggle); 703 bi->action = eina_stringshare_ref(_act_toggle);
704 bi->params = eina_stringshare_ref(entry->id); 704 bi->params = eina_stringshare_ref(entry->id);
705 705
706 e_managers_keys_ungrab(); 706 e_comp_canvas_keys_ungrab();
707 e_bindings->key_bindings = eina_list_append(e_bindings->key_bindings, bi); 707 e_bindings->key_bindings = eina_list_append(e_bindings->key_bindings, bi);
708 e_bindings_key_add(bi->context, bi->key, bi->modifiers, bi->any_mod, bi->action, bi->params); 708 e_bindings_key_add(bi->context, bi->key, bi->modifiers, bi->any_mod, bi->action, bi->params);
709 e_managers_keys_grab(); 709 e_comp_canvas_keys_grab();
710 e_config_save_queue(); 710 e_config_save_queue();
711 e_object_del(E_OBJECT(eg)); 711 e_object_del(E_OBJECT(eg));
712 return ECORE_CALLBACK_RENEW; 712 return ECORE_CALLBACK_RENEW;
diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c
index 57ab8f8..90ea95e 100644
--- a/src/modules/shot/e_mod_main.c
+++ b/src/modules/shot/e_mod_main.c
@@ -19,7 +19,6 @@ static Evas_Object *win = NULL;
19E_Confirm_Dialog *cd = NULL; 19E_Confirm_Dialog *cd = NULL;
20static Evas_Object *o_bg = NULL, *o_box = NULL, *o_content = NULL; 20static Evas_Object *o_bg = NULL, *o_box = NULL, *o_content = NULL;
21static Evas_Object *o_event = NULL, *o_img = NULL, *o_hlist = NULL; 21static Evas_Object *o_event = NULL, *o_img = NULL, *o_hlist = NULL;
22static E_Manager *sman = NULL;
23static int quality = 90; 22static int quality = 90;
24static int screen = -1; 23static int screen = -1;
25#define MAXZONES 64 24#define MAXZONES 64
@@ -599,10 +598,9 @@ _shot_now(E_Zone *zone, E_Client *ec, const char *params)
599 if ((!zone) && (!ec)) return; 598 if ((!zone) && (!ec)) return;
600 if (zone) 599 if (zone)
601 { 600 {
602 sman = e_comp->man; 601 xwin = e_comp->root;
603 xwin = sman->root; 602 w = sw = e_comp->w;
604 w = sw = sman->w; 603 h = sh = e_comp->h;
605 h = sh = sman->h;
606 x = y = 0; 604 x = y = 0;
607 if (!ecore_x_window_attributes_get(xwin, &watt)) return; 605 if (!ecore_x_window_attributes_get(xwin, &watt)) return;
608 visual = watt.visual; 606 visual = watt.visual;
@@ -935,9 +933,7 @@ _e_mod_action_cb(E_Object *obj, const char *params)
935 933
936 if (obj) 934 if (obj)
937 { 935 {
938 if (obj->type == E_MANAGER_TYPE) 936 if (obj->type == E_COMP_TYPE)
939 zone = e_zone_current_get();
940 else if (obj->type == E_COMP_TYPE)
941 zone = e_zone_current_get(); 937 zone = e_zone_current_get();
942 else if (obj->type == E_ZONE_TYPE) 938 else if (obj->type == E_ZONE_TYPE)
943 zone = ((E_Zone *)obj); 939 zone = ((E_Zone *)obj);
diff --git a/src/modules/systray/e_mod_main.c b/src/modules/systray/e_mod_main.c
index fed2de8..a441c57 100644
--- a/src/modules/systray/e_mod_main.c
+++ b/src/modules/systray/e_mod_main.c
@@ -511,7 +511,7 @@ Ecore_X_Window
511systray_root_get(const Instance *inst) 511systray_root_get(const Instance *inst)
512{ 512{
513 EINA_SAFETY_ON_NULL_RETURN_VAL(inst, 0); 513 EINA_SAFETY_ON_NULL_RETURN_VAL(inst, 0);
514 return inst->comp->man->root; 514 return e_comp->root;
515} 515}
516 516
517static void 517static void
diff --git a/src/modules/winlist/e_winlist.c b/src/modules/winlist/e_winlist.c
index 2d30e42..730c909 100644
--- a/src/modules/winlist/e_winlist.c
+++ b/src/modules/winlist/e_winlist.c
@@ -106,7 +106,7 @@ e_winlist_show(E_Zone *zone, E_Winlist_Filter filter)
106#ifndef HAVE_WAYLAND_ONLY 106#ifndef HAVE_WAYLAND_ONLY
107 if (e_comp->comp_type == E_PIXMAP_TYPE_X) 107 if (e_comp->comp_type == E_PIXMAP_TYPE_X)
108 { 108 {
109 _input_window = ecore_x_window_input_new(e_comp->man->root, 0, 0, 1, 1); 109 _input_window = ecore_x_window_input_new(e_comp->root, 0, 0, 1, 1);
110 ecore_x_window_show(_input_window); 110 ecore_x_window_show(_input_window);
111 if (!e_grabinput_get(_input_window, 0, _input_window)) 111 if (!e_grabinput_get(_input_window, 0, _input_window))
112 { 112 {
diff --git a/src/modules/wl_drm/e_mod_main.c b/src/modules/wl_drm/e_mod_main.c
index d7324fa..b68a0e7 100644
--- a/src/modules/wl_drm/e_mod_main.c
+++ b/src/modules/wl_drm/e_mod_main.c
@@ -133,8 +133,8 @@ e_modapi_init(E_Module *m)
133 e_xinerama_screens_set(eina_list_append(NULL, screen)); 133 e_xinerama_screens_set(eina_list_append(NULL, screen));
134 } 134 }
135 135
136 comp->man = e_manager_new(ecore_evas_window_get(comp->ee), comp, w, h); 136 comp->root = ecore_evas_window_get(comp->ee);
137 if (!e_comp_canvas_init()) return NULL; 137 if (!e_comp_canvas_init(w, h)) return NULL;
138 e_comp_canvas_fake_layers_init(); 138 e_comp_canvas_fake_layers_init();
139 139
140 /* NB: This needs to be called AFTER the comp canvas has been setup */ 140 /* NB: This needs to be called AFTER the comp canvas has been setup */
diff --git a/src/modules/wl_fb/e_mod_main.c b/src/modules/wl_fb/e_mod_main.c
index 0bec8cb..5d8b76fb 100644
--- a/src/modules/wl_fb/e_mod_main.c
+++ b/src/modules/wl_fb/e_mod_main.c
@@ -42,9 +42,9 @@ e_modapi_init(E_Module *m)
42 screen->h = h; 42 screen->h = h;
43 e_xinerama_screens_set(eina_list_append(NULL, screen)); 43 e_xinerama_screens_set(eina_list_append(NULL, screen));
44 } 44 }
45 comp->man = e_manager_new(ecore_evas_window_get(comp->ee), comp, w, h); 45 comp->root = ecore_evas_window_get(comp->ee);
46 e_comp_canvas_init(w, h);
46 e_comp_wl_init(); 47 e_comp_wl_init();
47 e_comp_canvas_init();
48 e_comp_canvas_fake_layers_init(); 48 e_comp_canvas_fake_layers_init();
49 comp->pointer = e_pointer_canvas_new(comp->ee, EINA_TRUE); 49 comp->pointer = e_pointer_canvas_new(comp->ee, EINA_TRUE);
50 50
diff --git a/src/modules/wl_x11/e_mod_main.c b/src/modules/wl_x11/e_mod_main.c
index fffebe0..65f41f6 100644
--- a/src/modules/wl_x11/e_mod_main.c
+++ b/src/modules/wl_x11/e_mod_main.c
@@ -89,7 +89,6 @@ e_modapi_init(E_Module *m)
89 } 89 }
90 90
91 ecore_evas_screen_geometry_get(comp->ee, NULL, NULL, &w, &h); 91 ecore_evas_screen_geometry_get(comp->ee, NULL, NULL, &w, &h);
92 ecore_evas_resize(comp->ee, w, h);
93 92
94 if (!e_xinerama_fake_screens_exist()) 93 if (!e_xinerama_fake_screens_exist())
95 { 94 {
@@ -102,8 +101,8 @@ e_modapi_init(E_Module *m)
102 e_xinerama_screens_set(eina_list_append(NULL, screen)); 101 e_xinerama_screens_set(eina_list_append(NULL, screen));
103 } 102 }
104 103
105 comp->man = e_manager_new(ecore_evas_window_get(comp->ee), comp, w, h); 104 comp->root = ecore_evas_window_get(comp->ee);
106 if (!e_comp_canvas_init()) return NULL; 105 if (!e_comp_canvas_init(w, h)) return NULL;
107 e_comp_canvas_fake_layers_init(); 106 e_comp_canvas_fake_layers_init();
108 107
109 /* NB: This needs to be called AFTER comp_canvas has been setup as it 108 /* NB: This needs to be called AFTER comp_canvas has been setup as it