forked from AuroraMiddleware/gtk
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:
parent
1c3f343baf
commit
964c6f7d58
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user