Enlightenment CVS committal
Author : sebastid
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_border.c e_border.h e_container.c e_container.h
e_moveresize.c e_moveresize.h
Log Message:
Window layers, incomplete.
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -3 -r1.158 -r1.159
--- e_border.c 28 Apr 2005 07:49:13 -0000 1.158
+++ e_border.c 28 Apr 2005 09:55:40 -0000 1.159
@@ -199,7 +199,6 @@
Ecore_X_Window_Attributes *att;
Evas_List *list;
E_Config_Binding *eb;
- Ecore_X_Window mwin;
unsigned int managed, desk[2];
int deskx, desky;
@@ -213,14 +212,6 @@
bd->h = 1;
bd->win = ecore_x_window_override_new(bd->container->win, 0, 0, bd->w,
bd->h);
ecore_x_window_shape_events_select(bd->win, 1);
- 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)
{
@@ -299,6 +290,8 @@
bd->w = bd->client.w;
bd->h = bd->client.h;
+
+ bd->layer = 100;
bd->changes.size = 1;
bd->changes.shape = 1;
@@ -321,8 +314,8 @@
ecore_x_window_save_set_add(win);
ecore_x_window_reparent(win, bd->client.shell_win, 0, 0);
ecore_x_window_border_width_set(win, 0);
- ecore_x_window_show(bd->event_win);
- ecore_x_window_show(bd->client.shell_win);
+ e_container_window_show(con, bd->event_win, bd->layer);
+ e_container_window_show(con, bd->client.shell_win, bd->layer);
bd->shape = e_container_shape_add(con);
bd->new_client = 1;
@@ -410,7 +403,7 @@
E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE);
if (bd->visible) return;
e_container_shape_show(bd->shape);
- ecore_x_window_show(bd->client.win);
+ e_container_window_show(bd->zone->container, bd->client.win, bd->layer);
e_hints_window_visible_set(bd->client.win);
bd->visible = 1;
bd->changes.visible = 1;
@@ -436,7 +429,7 @@
if (!bd->visible) return;
if (bd->moving) return;
- ecore_x_window_hide(bd->client.win);
+ e_container_window_hide(bd->zone->container, bd->client.win, bd->layer);
e_container_shape_hide(bd->shape);
if (!bd->iconic)
e_hints_window_hidden_set(bd->client.win);
@@ -581,22 +574,10 @@
void
e_border_raise(E_Border *bd)
{
- Ecore_X_Window mwin;
-
E_OBJECT_CHECK(bd);
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
- 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);
-
+ e_container_window_raise(bd->zone->container, bd->win, bd->layer);
{
E_Event_Border_Raise *ev;
@@ -606,8 +587,6 @@
ev->above = NULL;
ecore_event_add(E_EVENT_BORDER_RAISE, ev,
_e_border_event_border_raise_free, NULL);
}
- /* FIXME, ugly hack! */
- e_moveresize_raise();
}
void
@@ -1123,7 +1102,7 @@
if ((bd->changes.visible) && (bd->visible))
{
ecore_evas_show(bd->bg_ecore_evas);
- ecore_x_window_show(bd->win);
+ e_container_window_show(bd->zone->container, bd->win, bd->layer);
bd->changes.visible = 0;
}
}
@@ -1135,7 +1114,7 @@
bd = l->data;
if ((bd->changes.visible) && (!bd->visible))
{
- ecore_x_window_hide(bd->win);
+ e_container_window_hide(bd->zone->container, bd->win, bd->layer);
ecore_evas_hide(bd->bg_ecore_evas);
bd->changes.visible = 0;
}
@@ -2942,49 +2921,40 @@
{
/* show at start of unshade (but don't hide until end of shade) */
if (bd->shaded)
-// ecore_x_window_show(bd->client.shell_win);
- ecore_x_window_raise(bd->client.shell_win);
+ e_container_window_raise(bd->zone->container, bd->client.shell_win,
bd->layer);
bd->changes.shading = 0;
}
if ((bd->changes.shaded) && (bd->changes.pos) && (bd->changes.size))
{
if (bd->shaded)
-// ecore_x_window_hide(bd->client.shell_win);
- ecore_x_window_lower(bd->client.shell_win);
+ e_container_window_lower(bd->zone->container, bd->client.shell_win,
bd->layer);
else
-// ecore_x_window_show(bd->client.shell_win);
- ecore_x_window_raise(bd->client.shell_win);
+ e_container_window_raise(bd->zone->container, bd->client.shell_win,
bd->layer);
bd->changes.shaded = 0;
}
else if ((bd->changes.shaded) && (bd->changes.pos))
{
if (bd->shaded)
-// ecore_x_window_hide(bd->client.shell_win);
- ecore_x_window_lower(bd->client.shell_win);
+ e_container_window_lower(bd->zone->container, bd->client.shell_win,
bd->layer);
else
-// ecore_x_window_show(bd->client.shell_win);
- ecore_x_window_raise(bd->client.shell_win);
+ e_container_window_raise(bd->zone->container, bd->client.shell_win,
bd->layer);
bd->changes.size = 1;
bd->changes.shaded = 0;
}
else if ((bd->changes.shaded) && (bd->changes.size))
{
if (bd->shaded)
-// ecore_x_window_hide(bd->client.shell_win);
- ecore_x_window_lower(bd->client.shell_win);
+ e_container_window_lower(bd->zone->container, bd->client.shell_win,
bd->layer);
else
-// ecore_x_window_show(bd->client.shell_win);
- ecore_x_window_raise(bd->client.shell_win);
+ e_container_window_raise(bd->zone->container, bd->client.shell_win,
bd->layer);
bd->changes.shaded = 0;
}
else if (bd->changes.shaded)
{
if (bd->shaded)
-// ecore_x_window_hide(bd->client.shell_win);
- ecore_x_window_lower(bd->client.shell_win);
+ e_container_window_lower(bd->zone->container, bd->client.shell_win,
bd->layer);
else
-// ecore_x_window_show(bd->client.shell_win);
- ecore_x_window_raise(bd->client.shell_win);
+ e_container_window_raise(bd->zone->container, bd->client.shell_win,
bd->layer);
bd->changes.size = 1;
bd->changes.shaded = 0;
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- e_border.h 26 Apr 2005 09:36:18 -0000 1.34
+++ e_border.h 28 Apr 2005 09:55:40 -0000 1.35
@@ -216,6 +216,8 @@
unsigned char start : 1;
int x, y;
} drag;
+
+ unsigned int layer;
};
struct _E_Border_Pending_Move_Resize
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_container.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -3 -r1.38 -r1.39
--- e_container.c 25 Apr 2005 08:29:53 -0000 1.38
+++ e_container.c 28 Apr 2005 09:55:41 -0000 1.39
@@ -43,6 +43,7 @@
Evas_Object *o;
char name[40];
Evas_List *l, *screens;
+ int i;
con = E_OBJECT_ALLOC(E_Container, E_CONTAINER_TYPE, _e_container_free);
if (!con) return NULL;
@@ -98,6 +99,25 @@
snprintf(name, sizeof(name), "Container %d", con->num);
con->name = strdup(name);
+ /* init layers */
+ for (i = 0; i < 7; i++)
+ {
+ con->layers[i] = ecore_x_window_input_new(con->win, 0, 0, 1, 1);
+
+ if (i > 0)
+ ecore_x_window_configure(con->layers[i],
+ ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
+ ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
+ 0, 0, 0, 0, 0,
+ con->layers[i - 1],
ECORE_X_WINDOW_STACK_ABOVE);
+ }
+
+ ecore_x_window_configure(con->bg_win,
+ ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
+ ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
+ 0, 0, 0, 0, 0,
+ con->layers[0], ECORE_X_WINDOW_STACK_BELOW);
+
screens = (Evas_List *)e_xinerama_screens_get();
if (screens)
{
@@ -455,6 +475,52 @@
if (h) *h = es->solid_rect.h;
}
+/* layers
+ * 0 = desktop
+ * 50 = below
+ * 100 = normal
+ * 150 = above
+ * 200 = fullscreen
+ * 999 = internal on top windows for E
+ */
+void
+e_container_window_show(E_Container *con, Ecore_X_Window win, int layer)
+{
+ ecore_x_window_show(win);
+ e_container_window_raise(con, win, layer);
+}
+
+void
+e_container_window_hide(E_Container *con, Ecore_X_Window win, int layer)
+{
+ ecore_x_window_hide(win);
+}
+
+void
+e_container_window_raise(E_Container *con, Ecore_X_Window win, int layer)
+{
+ int pos;
+
+ if (layer == 0) pos = 0;
+ else if ((layer > 0) && (layer <= 50)) pos = 1;
+ else if ((layer > 50) && (layer <= 100)) pos = 2;
+ else if ((layer > 100) && (layer <= 150)) pos = 3;
+ else if ((layer > 150) && (layer <= 200)) pos = 4;
+ else pos = 5;
+
+ ecore_x_window_configure(win,
+ ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
+ ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
+ 0, 0, 0, 0, 0,
+ con->layers[pos], ECORE_X_WINDOW_STACK_BELOW);
+}
+
+void
+e_container_window_lower(E_Container *con, Ecore_X_Window win, int layer)
+{
+ ecore_x_window_lower(win);
+}
+
/* local subsystem functions */
static void
_e_container_free(E_Container *con)
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_container.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- e_container.h 13 Apr 2005 15:52:33 -0000 1.16
+++ e_container.h 28 Apr 2005 09:55:41 -0000 1.17
@@ -48,6 +48,8 @@
Evas_List *shape_change_cb;
Evas_List *zones;
Evas_List *clients;
+
+ Ecore_X_Window layers[7];
};
struct _E_Container_Shape
@@ -105,6 +107,11 @@
EAPI void e_container_shape_solid_rect_set(E_Container_Shape
*es, int x, int y, int w, int h);
EAPI void e_container_shape_solid_rect_get(E_Container_Shape
*es, int *x, int *y, int *w, int *h);
+EAPI void e_container_window_show(E_Container *con,
Ecore_X_Window, int layer);
+EAPI void e_container_window_hide(E_Container *con,
Ecore_X_Window, int layer);
+EAPI void e_container_window_raise(E_Container *con,
Ecore_X_Window, int layer);
+EAPI void e_container_window_lower(E_Container *con,
Ecore_X_Window, int layer);
+
extern EAPI int E_EVENT_CONTAINER_RESIZE;
#endif
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_moveresize.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- e_moveresize.c 27 Apr 2005 08:42:36 -0000 1.7
+++ e_moveresize.c 28 Apr 2005 09:55:41 -0000 1.8
@@ -141,9 +141,3 @@
snprintf(buf, sizeof(buf) - 1, "%i %i", x, y);
edje_object_part_text_set(_obj, "text", buf);
}
-
-void
-e_moveresize_raise(void)
-{
- if (_ee) ecore_evas_raise(_ee);
-}
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_moveresize.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e_moveresize.h 24 Apr 2005 21:11:44 -0000 1.1
+++ e_moveresize.h 28 Apr 2005 09:55:41 -0000 1.2
@@ -9,5 +9,3 @@
EAPI void e_move_begin(E_Zone *zone, int x, int y);
EAPI void e_move_end(void);
EAPI void e_move_update(int x, int y);
-
-EAPI void e_moveresize_raise(void);
-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs