x11: Fix wrong condition when unsetting transient-for

Setting a new transient-for parent is only possible if the given parent
window is valid, not when it is NULL or valid.
This commit is contained in:
Timm Bäder 2017-12-19 11:53:31 +01:00
parent 1c3f343baf
commit 964c6f7d58

View File

@ -2453,7 +2453,7 @@ gdk_x11_window_set_transient_for (GdkWindow *window,
return;
/* XSetTransientForHint() doesn't allow unsetting, so do it manually */
if (!parent || !GDK_WINDOW_DESTROYED (parent))
if (parent && !GDK_WINDOW_DESTROYED (parent))
XSetTransientForHint (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
GDK_WINDOW_XID (parent));