don't place transient-for-whole-group windows above _each other_, only

2002-10-17  Havoc Pennington  <hp@redhat.com>

	* src/stack.c (apply_constraints): don't place
	transient-for-whole-group windows above _each other_, only
	above other windows in the group that aren't themselves
	transient-for-whole-group. Should help with part of #94876
This commit is contained in:
Havoc Pennington 2002-10-17 16:36:50 +00:00 committed by Havoc Pennington
parent 4eb8a93c83
commit 5ba2fa893f
2 changed files with 19 additions and 8 deletions

View File

@ -1,3 +1,10 @@
2002-10-17 Havoc Pennington <hp@redhat.com>
* src/stack.c (apply_constraints): don't place
transient-for-whole-group windows above _each other_, only
above other windows in the group that aren't themselves
transient-for-whole-group. Should help with part of #94876
2002-10-17 Havoc Pennington <hp@redhat.com> 2002-10-17 Havoc Pennington <hp@redhat.com>
* src/stack.c (apply_constraints): fix memory leak of * src/stack.c (apply_constraints): fix memory leak of

View File

@ -415,6 +415,15 @@ ensure_above (MetaWindow *above,
above->stack_position, below->stack_position); above->stack_position, below->stack_position);
} }
#define WINDOW_TRANSIENT_FOR_WHOLE_GROUP(w) \
((w->xtransient_for == None || \
w->transient_parent_is_root_window) && \
(w->type == META_WINDOW_DIALOG || \
w->type == META_WINDOW_MODAL_DIALOG || \
w->type == META_WINDOW_TOOLBAR || \
w->type == META_WINDOW_MENU || \
w->type == META_WINDOW_UTILITY))
static void static void
apply_constraints (GList *list) apply_constraints (GList *list)
{ {
@ -428,13 +437,7 @@ apply_constraints (GList *list)
{ {
MetaWindow *w = tmp->data; MetaWindow *w = tmp->data;
if ((w->xtransient_for == None || if (WINDOW_TRANSIENT_FOR_WHOLE_GROUP (w))
w->transient_parent_is_root_window) &&
(w->type == META_WINDOW_DIALOG ||
w->type == META_WINDOW_MODAL_DIALOG ||
w->type == META_WINDOW_TOOLBAR ||
w->type == META_WINDOW_MENU ||
w->type == META_WINDOW_UTILITY))
{ {
GSList *group_windows; GSList *group_windows;
GSList *tmp2; GSList *tmp2;
@ -453,7 +456,8 @@ apply_constraints (GList *list)
{ {
MetaWindow *group_window = tmp2->data; MetaWindow *group_window = tmp2->data;
if (!(meta_window_is_ancestor_of_transient (w, group_window))) if (!(meta_window_is_ancestor_of_transient (w, group_window)) &&
!WINDOW_TRANSIENT_FOR_WHOLE_GROUP (group_window))
{ {
meta_topic (META_DEBUG_STACK, "Stacking %s above %s as it's a dialog transient for its group\n", meta_topic (META_DEBUG_STACK, "Stacking %s above %s as it's a dialog transient for its group\n",
w->desc, group_window->desc); w->desc, group_window->desc);