window: Include window itself in transient loop check

While it doesn't make sense to set a window as transient to
itself, our existing check whether making a window transient
doesn't cover it, so it's still possible to create an infinite
loop.

https://bugzilla.gnome.org/show_bug.cgi?id=783502
This commit is contained in:
Florian Müllner 2017-06-07 14:12:39 +02:00
parent edab8c3a4c
commit 5f49bda591

View File

@ -7508,7 +7508,7 @@ check_transient_for_loop (MetaWindow *window,
{
while (parent)
{
if (parent->transient_for == window)
if (parent == window)
return TRUE;
parent = parent->transient_for;
}