Enlightenment CVS committal Author : sebastid Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_border.c e_border.h Log Message: * Check and remember WM_TRANSIENT_FOR relationships. * Only check if bd->client.icccm.transient_for is set, bd->client.netwm.type == ECORE_X_WINDOW_TYPE_DIALOG is only for decorations. * When a border is raised, raise it's children above it. * Should this behaviour be userdefineable? =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v retrieving revision 1.381 retrieving revision 1.382 diff -u -3 -r1.381 -r1.382 --- e_border.c 31 Aug 2005 04:41:47 -0000 1.381 +++ e_border.c 2 Sep 2005 06:15:57 -0000 1.382 @@ -782,6 +782,7 @@ e_border_raise(E_Border *bd) { E_Border *above; + Evas_List *l; E_OBJECT_CHECK(bd); E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE); @@ -807,6 +808,13 @@ ev->below = NULL; ecore_event_add(E_EVENT_BORDER_LOWER, ev, _e_border_event_border_lower_free, NULL); } + for (l = bd->children; l; l = l->next) + { + E_Border *child; + + child = l->data; + e_border_stack_above(child, bd); + } } void @@ -2210,6 +2218,17 @@ // e_object_breadcrumb_add(E_OBJECT(bd), "border_remove_event"); ecore_event_add(E_EVENT_BORDER_REMOVE, ev, _e_border_event_border_remove_free, NULL); } + + if (bd->parent) + bd->parent->children = evas_list_remove(bd->parent->children, bd); + while (bd->children) + { + E_Border *child; + + child = bd->children->data; + child->parent = NULL; + bd->children = evas_list_remove_list(bd->children, bd->children); + } } static void @@ -4596,6 +4615,17 @@ if (bd->new_client) { bd->new_client = 0; + if (bd->client.icccm.transient_for) + { + E_Border *bd_parent; + + bd_parent = e_border_find_by_client_window(bd->client.icccm.transient_for); + if (bd_parent) + { + bd_parent->children = evas_list_append(bd_parent->children, bd); + bd->parent = bd_parent; + } + } // printf("##- NEW CLIENT SETUP 0x%x\n", bd->client.win); if (bd->re_manage) { @@ -4658,22 +4688,13 @@ /* FIXME: special placement for dialogs etc. etc. etc goes * here */ - if ((bd->client.netwm.type == ECORE_X_WINDOW_TYPE_DIALOG) && - ((bd->client.icccm.transient_for != 0))) + /* FIXME: what if parent is not on this desktop - or zone? */ + if ((bd->parent) && (bd->parent->visible)) { - E_Border *bd_parent; - - bd_parent = e_border_find_by_client_window(bd->client.icccm.transient_for); -// if (!bd_parent) -// bd_parent = e_border_find_by_client_window(bd->client.icccm.client_leader); - /* FIXME: what if parent is not on this desktop - or zone? */ - if ((bd_parent) && (bd_parent->visible)) - { - bd->x = bd_parent->x + ((bd_parent->w - bd->w) / 2); - bd->y = bd_parent->y + ((bd_parent->h - bd->h) / 2); - bd->changes.pos = 1; - placed = 1; - } + bd->x = bd->parent->x + ((bd->parent->w - bd->w) / 2); + bd->y = bd->parent->y + ((bd->parent->h - bd->h) / 2); + bd->changes.pos = 1; + placed = 1; } if (!placed) { =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.h,v retrieving revision 1.105 retrieving revision 1.106 diff -u -3 -r1.105 -r1.106 --- e_border.h 31 Aug 2005 04:41:48 -0000 1.105 +++ e_border.h 2 Sep 2005 06:15:57 -0000 1.106 @@ -385,7 +385,8 @@ Ecore_X_Rectangle *shape_rects; E_Remember *remember; -// Ecore_Timer *dangling_ref_check; + E_Border *parent; + Evas_List *children; }; struct _E_Border_Pending_Move_Resize ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs