[gtk+/wip/baedert/gl: 94/95] x11: Fix wrong condition when unsetting transient-for



commit abcd43955c4871581241d7baad183b6502da8952
Author: Timm Bäder <mail baedert org>
Date:   Tue Dec 19 11:53:31 2017 +0100

    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 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index c6d6e30..9300fed 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));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]