Enlightenment CVS committal Author : sebastid Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_container.c e_container.h Log Message: Create a client list for each layer, so that stacking order will be correct. Fix the rest later. =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_container.c,v retrieving revision 1.46 retrieving revision 1.47 diff -u -3 -r1.46 -r1.47 --- e_container.c 12 May 2005 03:32:48 -0000 1.46 +++ e_container.c 13 May 2005 07:20:09 -0000 1.47 @@ -114,14 +114,14 @@ /* init layers */ for (i = 0; i < 7; i++) { - con->layers[i] = ecore_x_window_input_new(con->win, 0, 0, 1, 1); + con->layers[i].win = 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(con->layers[i].win, 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); + con->layers[i - 1].win, ECORE_X_WINDOW_STACK_ABOVE); } mwin = e_init_window_get(); @@ -130,7 +130,7 @@ ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING | ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE, 0, 0, 0, 0, 0, - con->layers[6], ECORE_X_WINDOW_STACK_ABOVE); + con->layers[6].win, ECORE_X_WINDOW_STACK_ABOVE); mwin = e_menu_grab_window_get(); @@ -139,7 +139,7 @@ ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING | ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE, 0, 0, 0, 0, 0, - con->layers[6], ECORE_X_WINDOW_STACK_ABOVE); + con->layers[6].win, ECORE_X_WINDOW_STACK_ABOVE); screens = (Evas_List *)e_xinerama_screens_get(); @@ -523,7 +523,8 @@ void e_container_window_raise(E_Container *con, Ecore_X_Window win, int layer) { - int pos; + int pos, i; + E_Border *bd; if (layer == 0) pos = 1; else if ((layer > 0) && (layer <= 50)) pos = 2; @@ -536,13 +537,21 @@ 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); + con->layers[pos].win, ECORE_X_WINDOW_STACK_BELOW); + + bd = e_border_find_by_client_window(win); + if (!bd) return; + /* FIXME, remember the old layer if layer is changed. */ + for (i = 0; i < 7; i++) + con->layers[i].clients = evas_list_remove(con->layers[i].clients, bd); + con->layers[pos - 1].clients = evas_list_append(con->layers[pos - 1].clients, bd); } void e_container_window_lower(E_Container *con, Ecore_X_Window win, int layer) { - int pos; + int pos, i; + E_Border *bd; if (layer == 0) pos = 0; else if ((layer > 0) && (layer <= 50)) pos = 1; @@ -555,7 +564,14 @@ 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_ABOVE); + con->layers[pos].win, ECORE_X_WINDOW_STACK_ABOVE); + + bd = e_border_find_by_client_window(win); + if (!bd) return; + /* FIXME, remember the old layer if layer is changed. */ + for (i = 0; i < 7; i++) + con->layers[i].clients = evas_list_remove(con->layers[i].clients, bd); + con->layers[pos].clients = evas_list_prepend(con->layers[pos].clients, bd); } /* local subsystem functions */ =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_container.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- e_container.h 12 May 2005 13:13:53 -0000 1.18 +++ e_container.h 13 May 2005 07:20:09 -0000 1.19 @@ -49,7 +49,10 @@ Evas_List *zones; Evas_List *clients; - Ecore_X_Window layers[7]; + struct { + Ecore_X_Window win; + Evas_List *clients; + } layers[7]; }; struct _E_Container_Shape ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs