Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_border.c e_config.c e_config.h e_container.c e_error.c
e_hints.c e_init.c e_main.c e_manager.c
Log Message:
virtual roots is an option now (off by default)
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -3 -r1.108 -r1.109
--- e_border.c 11 Mar 2005 11:20:46 -0000 1.108
+++ e_border.c 11 Mar 2005 13:09:06 -0000 1.109
@@ -180,6 +180,7 @@
Ecore_X_Window_Attributes *att;
Evas_List *list;
E_Config_Binding *eb;
+ Ecore_X_Window mwin;
unsigned int managed, desk[2];
int deskx, desky;
@@ -192,6 +193,14 @@
bd->w = 1;
bd->h = 1;
bd->win = ecore_x_window_override_new(bd->container->win, 0, 0, bd->w,
bd->h);
+ mwin = e_menu_grab_window_get();
+ if (!mwin) mwin = e_init_window_get();
+ if (mwin)
+ ecore_x_window_configure(bd->win,
+ ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
+ ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
+ 0, 0, 0, 0, 0,
+ mwin, ECORE_X_WINDOW_STACK_BELOW);
/* Bindings */
for (list = e_config->bindings; list; list = list->next)
{
@@ -568,6 +577,7 @@
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
_e_border_reorder_after(bd, NULL);
mwin = e_menu_grab_window_get();
+ if (!mwin) mwin = e_init_window_get();
if (!mwin)
ecore_x_window_raise(bd->win);
else
@@ -584,7 +594,11 @@
E_OBJECT_CHECK(bd);
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
_e_border_reorder_before(bd, NULL);
- ecore_x_window_lower(bd->win);
+ ecore_x_window_configure(bd->win,
+ ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
+ ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
+ 0, 0, 0, 0, 0,
+ bd->container->bg_win, ECORE_X_WINDOW_STACK_ABOVE);
}
void
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- e_config.c 15 Feb 2005 17:16:02 -0000 1.22
+++ e_config.c 11 Mar 2005 13:09:06 -0000 1.23
@@ -86,6 +86,7 @@
e_config->font_cache = 512;
e_config->zone_desks_x_count = 1;
e_config->zone_desks_y_count = 1;
+ e_config->use_virtual_roots = 0;
{
E_Config_Module *em;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- e_config.h 8 Feb 2005 03:51:08 -0000 1.10
+++ e_config.h 11 Mar 2005 13:09:06 -0000 1.11
@@ -61,6 +61,7 @@
int font_cache;
int zone_desks_x_count;
int zone_desks_y_count;
+ int use_virtual_roots;
Evas_List *modules;
Evas_List *bindings;
};
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_container.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- e_container.c 11 Mar 2005 11:05:52 -0000 1.31
+++ e_container.c 11 Mar 2005 13:09:06 -0000 1.32
@@ -52,16 +52,36 @@
con->manager->containers = evas_list_append(con->manager->containers, con);
con->w = con->manager->w;
con->h = con->manager->h;
- con->win = ecore_x_window_override_new(con->manager->win, con->x, con->y,
con->w, con->h);
- ecore_x_icccm_title_set(con->win, "Enlightenment Container");
+ if (e_config->use_virtual_roots)
+ {
+ Ecore_X_Window mwin;
+
+ con->win = ecore_x_window_override_new(con->manager->win, con->x,
con->y, con->w, con->h);
+ ecore_x_icccm_title_set(con->win, "Enlightenment Container");
+ mwin = e_menu_grab_window_get();
+ if (!mwin) mwin = e_init_window_get();
+ if (!mwin)
+ ecore_x_window_raise(con->win);
+ else
+ ecore_x_window_configure(con->win,
+ ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
+ ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
+ 0, 0, 0, 0, 0,
+ mwin, ECORE_X_WINDOW_STACK_BELOW);
+ }
+ else
+ {
+ con->win = con->manager->win;
+ }
con->bg_ecore_evas = ecore_evas_software_x11_new(NULL, con->win, 0, 0,
con->w, con->h);
+ ecore_evas_override_set(con->bg_ecore_evas, 1);
e_canvas_add(con->bg_ecore_evas);
con->bg_evas = ecore_evas_get(con->bg_ecore_evas);
con->bg_win = ecore_evas_software_x11_window_get(con->bg_ecore_evas);
ecore_evas_name_class_set(con->bg_ecore_evas, "E", "Background_Window");
ecore_evas_title_set(con->bg_ecore_evas, "Enlightenment Background");
ecore_evas_avoid_damage_set(con->bg_ecore_evas, 1);
- ecore_evas_show(con->bg_ecore_evas);
+ ecore_x_window_lower(con->bg_win);
ecore_evas_callback_resize_set(con->bg_ecore_evas,
_e_container_cb_bg_ecore_evas_resize);
@@ -97,11 +117,13 @@
void
e_container_show(E_Container *con)
{
- printf("Container show!\n");
E_OBJECT_CHECK(con);
E_OBJECT_TYPE_CHECK(con, E_CONTAINER_TYPE);
if (con->visible) return;
- ecore_x_window_show(con->win);
+ ecore_evas_show(con->bg_ecore_evas);
+ ecore_x_window_lower(con->bg_win);
+ if (con->win != con->manager->win)
+ ecore_x_window_show(con->win);
con->visible = 1;
}
@@ -111,7 +133,9 @@
E_OBJECT_CHECK(con);
E_OBJECT_TYPE_CHECK(con, E_CONTAINER_TYPE);
if (!con->visible) return;
- ecore_x_window_hide(con->win);
+ ecore_evas_hide(con->bg_ecore_evas);
+ if (con->win != con->manager->win)
+ ecore_x_window_hide(con->win);
con->visible = 0;
}
@@ -139,7 +163,8 @@
if ((x == con->x) && (y == con->y)) return;
con->x = x;
con->y = y;
- ecore_x_window_move(con->win, con->x, con->y);
+ if (con->win != con->manager->win)
+ ecore_x_window_move(con->win, con->x, con->y);
evas_object_move(con->bg_blank_object, con->x, con->y);
}
@@ -151,7 +176,8 @@
if ((w == con->w) && (h == con->h)) return;
con->w = w;
con->h = h;
- ecore_x_window_resize(con->win, con->w, con->h);
+ if (con->win != con->manager->win)
+ ecore_x_window_resize(con->win, con->w, con->h);
ecore_evas_resize(con->bg_ecore_evas, con->w, con->h);
evas_object_resize(con->bg_blank_object, con->w, con->h);
}
@@ -166,7 +192,8 @@
con->y = y;
con->w = w;
con->h = h;
- ecore_x_window_move_resize(con->win, con->x, con->y, con->w, con->h);
+ if (con->win != con->manager->win)
+ ecore_x_window_move_resize(con->win, con->x, con->y, con->w, con->h);
ecore_evas_resize(con->bg_ecore_evas, con->w, con->h);
evas_object_move(con->bg_blank_object, con->x, con->y);
evas_object_resize(con->bg_blank_object, con->w, con->h);
@@ -177,7 +204,14 @@
{
E_OBJECT_CHECK(con);
E_OBJECT_TYPE_CHECK(con, E_CONTAINER_TYPE);
- ecore_x_window_raise(con->win);
+ if (con->win != con->manager->win)
+ {
+ ecore_x_window_raise(con->win);
+ }
+ else
+ {
+ ecore_x_window_lower(con->bg_win);
+ }
}
void
@@ -185,7 +219,12 @@
{
E_OBJECT_CHECK(con);
E_OBJECT_TYPE_CHECK(con, E_CONTAINER_TYPE);
- ecore_x_window_lower(con->win);
+ if (con->win != con->manager->win)
+ ecore_x_window_lower(con->win);
+ else
+ {
+ ecore_x_window_lower(con->bg_win);
+ }
}
Evas_List *
@@ -372,6 +411,7 @@
_e_container_free(E_Container *con)
{
Evas_List *l, *tmp;
+
if (con->gadman) e_object_del(E_OBJECT(con->gadman));
/* We can't use e_object_del here, because border adds a ref to itself
* when it is removed, and the ref is never unref'ed */
@@ -390,7 +430,10 @@
con->manager->containers = evas_list_remove(con->manager->containers, con);
e_canvas_del(con->bg_ecore_evas);
ecore_evas_free(con->bg_ecore_evas);
- ecore_x_window_del(con->win);
+ if (con->manager->win != con->win)
+ {
+ ecore_x_window_del(con->win);
+ }
free(con);
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_error.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- e_error.c 11 Mar 2005 11:05:52 -0000 1.8
+++ e_error.c 11 Mar 2005 13:09:06 -0000 1.9
@@ -299,7 +299,22 @@
o = evas_object_rectangle_add(e);
evas_object_name_set(o, "allocated");
}
- ecore_evas_show(ee);
+ {
+ Ecore_X_Window mwin, win;
+
+ win = ecore_evas_software_x11_window_get(ee);
+ mwin = e_menu_grab_window_get();
+ if (!mwin) mwin = e_init_window_get();
+ if (!mwin)
+ ecore_x_window_raise(win);
+ else
+ ecore_x_window_configure(win,
+ ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
+ ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
+ 0, 0, 0, 0, 0,
+ mwin, ECORE_X_WINDOW_STACK_BELOW);
+ ecore_evas_show(ee);
+ }
}
/* local subsystem functions */
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_hints.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- e_hints.c 15 Feb 2005 12:11:31 -0000 1.8
+++ e_hints.c 11 Mar 2005 13:09:06 -0000 1.9
@@ -221,7 +221,10 @@
{
m = ml->data;
ecore_x_netwm_desk_count_set(m->root, num);
- ecore_x_netwm_desk_roots_set(m->root, num, vroots);
+ if (e_config->use_virtual_roots)
+ {
+ ecore_x_netwm_desk_roots_set(m->root, num, vroots);
+ }
ecore_x_netwm_desk_workareas_set(m->root, num, areas);
}
free(vroots);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_init.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- e_init.c 11 Mar 2005 11:05:52 -0000 1.12
+++ e_init.c 11 Mar 2005 13:09:06 -0000 1.13
@@ -39,10 +39,10 @@
ecore_x_window_size_get(root, &w, &h);
_e_init_ecore_evas = ecore_evas_software_x11_new(NULL, root, 0, 0, w, h);
+ ecore_evas_override_set(_e_init_ecore_evas, 1);
e_canvas_add(_e_init_ecore_evas);
_e_init_evas = ecore_evas_get(_e_init_ecore_evas);
_e_init_win = ecore_evas_software_x11_window_get(_e_init_ecore_evas);
- ecore_evas_override_set(_e_init_ecore_evas, 1);
ecore_evas_name_class_set(_e_init_ecore_evas, "E", "Init_Window");
ecore_evas_title_set(_e_init_ecore_evas, "Enlightenment Init");
e_pointer_ecore_evas_set(_e_init_ecore_evas);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_main.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -3 -r1.50 -r1.51
--- e_main.c 8 Mar 2005 06:51:21 -0000 1.50
+++ e_main.c 11 Mar 2005 13:09:06 -0000 1.51
@@ -533,7 +533,10 @@
if (con)
{
e_manager_manage_windows(man);
- ecore_x_netwm_desk_roots_set(man->root, 1, &(con->win));
+ if (e_config->use_virtual_roots)
+ {
+ ecore_x_netwm_desk_roots_set(man->root, 1, &(con->win));
+ }
e_container_show(con);
}
else
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_manager.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- e_manager.c 16 Feb 2005 11:29:31 -0000 1.13
+++ e_manager.c 11 Mar 2005 13:09:06 -0000 1.14
@@ -64,8 +64,27 @@
managers = evas_list_append(managers, man);
man->root = root;
ecore_x_window_size_get(man->root, &(man->w), &(man->h));
- man->win = ecore_x_window_override_new(man->root, man->x, man->y, man->w,
man->h);
- ecore_x_icccm_title_set(man->win, "Enlightenment Manager");
+ if (e_config->use_virtual_roots)
+ {
+ Ecore_X_Window mwin;
+
+ man->win = ecore_x_window_override_new(man->root, man->x, man->y,
man->w, man->h);
+ ecore_x_icccm_title_set(man->win, "Enlightenment Manager");
+ mwin = e_menu_grab_window_get();
+ if (!mwin) mwin = e_init_window_get();
+ if (!mwin)
+ ecore_x_window_raise(man->win);
+ else
+ ecore_x_window_configure(man->win,
+ ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
+ ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
+ 0, 0, 0, 0, 0,
+ mwin, ECORE_X_WINDOW_STACK_BELOW);
+ }
+ else
+ {
+ man->win = man->root;
+ }
h = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHOW_REQUEST,
_e_manager_cb_window_show_request, man);
if (h) man->handlers = evas_list_append(man->handlers, h);
h = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_CONFIGURE,
_e_manager_cb_window_configure, man);
@@ -163,22 +182,55 @@
void
e_manager_show(E_Manager *man)
{
+ Evas_List *l;
+
E_OBJECT_CHECK(man);
E_OBJECT_TYPE_CHECK(man, E_MANAGER_TYPE);
if (man->visible) return;
- ecore_x_window_show(man->win);
+ for (l = man->containers; l; l = l->next)
+ {
+ E_Container *con;
+
+ con = l->data;
+ e_container_show(con);
+ }
+ if (man->root != man->win)
+ {
+ Ecore_X_Window mwin;
+
+ mwin = e_menu_grab_window_get();
+ if (!mwin) mwin = e_init_window_get();
+ if (!mwin)
+ ecore_x_window_raise(man->win);
+ else
+ ecore_x_window_configure(man->win,
+ ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
+ ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
+ 0, 0, 0, 0, 0,
+ mwin, ECORE_X_WINDOW_STACK_BELOW);
+ ecore_x_window_show(man->win);
+ }
ecore_x_window_focus(man->win);
- e_init_show();
man->visible = 1;
}
void
e_manager_hide(E_Manager *man)
{
+ Evas_List *l;
+
E_OBJECT_CHECK(man);
E_OBJECT_TYPE_CHECK(man, E_MANAGER_TYPE);
if (!man->visible) return;
- ecore_x_window_hide(man->win);
+ for (l = man->containers; l; l = l->next)
+ {
+ E_Container *con;
+
+ con = l->data;
+ e_container_hide(con);
+ }
+ if (man->root != man->win)
+ ecore_x_window_hide(man->win);
man->visible = 0;
}
@@ -188,9 +240,12 @@
E_OBJECT_CHECK(man);
E_OBJECT_TYPE_CHECK(man, E_MANAGER_TYPE);
if ((x == man->x) && (y == man->y)) return;
- man->x = x;
- man->y = y;
- ecore_x_window_move(man->win, man->x, man->y);
+ if (man->root != man->win)
+ {
+ man->x = x;
+ man->y = y;
+ ecore_x_window_move(man->win, man->x, man->y);
+ }
}
void
@@ -203,7 +258,8 @@
if ((w == man->w) && (h == man->h)) return;
man->w = w;
man->h = h;
- ecore_x_window_resize(man->win, man->w, man->h);
+ if (man->root != man->win)
+ ecore_x_window_resize(man->win, man->w, man->h);
for (l = man->containers; l; l = l->next)
{
@@ -222,8 +278,11 @@
E_OBJECT_CHECK(man);
E_OBJECT_TYPE_CHECK(man, E_MANAGER_TYPE);
if ((x == man->x) && (y == man->y) && (w == man->w) && (h == man->h))
return;
- man->x = x;
- man->y = y;
+ if (man->root != man->win)
+ {
+ man->x = x;
+ man->y = y;
+ }
man->w = w;
man->h = h;
ecore_x_window_move_resize(man->win, man->x, man->y, man->w, man->h);
@@ -242,8 +301,21 @@
{
E_OBJECT_CHECK(man);
E_OBJECT_TYPE_CHECK(man, E_MANAGER_TYPE);
- ecore_x_window_raise(man->win);
- e_init_show();
+ if (man->root != man->win)
+ {
+ Ecore_X_Window mwin;
+
+ mwin = e_menu_grab_window_get();
+ if (!mwin) mwin = e_init_window_get();
+ if (!mwin)
+ ecore_x_window_raise(man->win);
+ else
+ ecore_x_window_configure(man->win,
+ ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
+ ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
+ 0, 0, 0, 0, 0,
+ mwin, ECORE_X_WINDOW_STACK_BELOW);
+ }
}
void
@@ -251,7 +323,8 @@
{
E_OBJECT_CHECK(man);
E_OBJECT_TYPE_CHECK(man, E_MANAGER_TYPE);
- ecore_x_window_lower(man->win);
+ if (man->root != man->win)
+ ecore_x_window_lower(man->win);
}
E_Container *
@@ -304,7 +377,10 @@
l = l->next;
e_object_del(E_OBJECT(tmp->data));
}
- ecore_x_window_del(man->win);
+ if (man->root != man->win)
+ {
+ ecore_x_window_del(man->win);
+ }
managers = evas_list_remove(managers, man);
free(man);
}
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs