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.
This commit is contained in:
Akkana Peck 2025-04-25 08:52:36 -06:00 committed by Bruno
parent 8fb6d64415
commit 7a961cf4a4

View file

@ -627,8 +627,14 @@ gimp_dialog_factory_dialog_new_internal (GimpDialogFactory *factory,
if (GTK_IS_WINDOW (parent_toplevel)) if (GTK_IS_WINDOW (parent_toplevel))
{ {
gtk_window_set_transient_for (GTK_WINDOW (dialog), GimpGuiConfig *config = NULL;
GTK_WINDOW (parent_toplevel));
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));
} }
} }