From: Luca Bacci Date: Thu, 13 Jul 2023 13:31:05 +0000 (+0200) Subject: GdkWindow: Check for offscreen windows in set_transient_for () X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~24 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=08fc1a001a32768b950a04027dbfc483435df62f;p=gtk%2B3.0.git GdkWindow: Check for offscreen windows in set_transient_for () Bug: https://gitlab.gnome.org/GNOME/gimp/-/issues/6711 Forwarded: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6184 Origin: 3.24.39, commit:3e3266dce4a8aed453f296ca8043e3574ff29f63 Gbp-Pq: Name GdkWindow-Check-for-offscreen-windows-in-set_transient_fo.patch --- diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 727b0cf1f4..62d488d759 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -10542,6 +10542,13 @@ void gdk_window_set_transient_for (GdkWindow *window, GdkWindow *parent) { + if (!gdk_window_is_offscreen (window) && + parent != NULL && + gdk_window_is_offscreen (parent)) + { + return; + } + window->transient_for = parent; GDK_WINDOW_IMPL_GET_CLASS (window->impl)->set_transient_for (window, parent);