From 7a961cf4a4ea46f4e1e49b6202fcaebfc1f628bf Mon Sep 17 00:00:00 2001 From: Akkana Peck Date: Fri, 25 Apr 2025 08:52:36 -0600 Subject: [PATCH] window hints: fix transient-for keep-above behavior Fixes issue 5176. In GIMP2, the window hint preference controlled whether the image window was allowed to draw on top of the Toolbox and docks. In GIMP3/GTK3, apparently that hint does nothing; it's transient-for that controls that behavior. This patch uses the transient-for setting only if dock_window_hint is set to GIMP_WINDOW_HINT_KEEP_ABOVE. --- app/widgets/gimpdialogfactory.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/widgets/gimpdialogfactory.c b/app/widgets/gimpdialogfactory.c index 7445244f16..f00d9f8eb8 100644 --- a/app/widgets/gimpdialogfactory.c +++ b/app/widgets/gimpdialogfactory.c @@ -627,8 +627,14 @@ gimp_dialog_factory_dialog_new_internal (GimpDialogFactory *factory, if (GTK_IS_WINDOW (parent_toplevel)) { - gtk_window_set_transient_for (GTK_WINDOW (dialog), - GTK_WINDOW (parent_toplevel)); + GimpGuiConfig *config = NULL; + + if (context != NULL) + config = GIMP_GUI_CONFIG (context->gimp->config); + + if (! config || config->dock_window_hint != GIMP_WINDOW_HINT_NORMAL) + gtk_window_set_transient_for (GTK_WINDOW (dialog), + GTK_WINDOW (parent_toplevel)); } }