reload_transient_for: avoid xtransient_for loops

Don't set a window's xtransient_for if it would create a loop. Since
this is the only place we ever set xtransient_for, we can therefore
assume everywhere else that it does not loop.

https://bugzilla.gnome.org/show_bug.cgi?id=647712
This commit is contained in:
Dan Winship
2011-05-06 05:09:04 -04:00
parent a8cfdc19e2
commit 6dc79ce60a
4 changed files with 33 additions and 41 deletions

View File

@ -754,7 +754,7 @@ constrain_modal_dialog (MetaWindow *window,
if (!meta_prefs_get_attach_modal_dialogs ())
return TRUE;
if (window->type != META_WINDOW_MODAL_DIALOG || !parent || parent == window)
if (window->type != META_WINDOW_MODAL_DIALOG || !parent)
return TRUE;
x = parent->rect.x + (parent->rect.width / 2 - info->current.width / 2);