From 964c6f7d582eb26f4ce8c32b141639367b43622d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 19 Dec 2017 11:53:31 +0100 Subject: [PATCH] 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. --- gdk/x11/gdkwindow-x11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index c6d6e30f7b..9300fed6d0 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -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));