Special case tansient-parent windows on macOS

macOS has its own z-axis stacking (see Manager::set_transient_for) for
dialog and utility windows of a single application. There only case to
set a dedicated transient parent is to keep the child window on top of a
dialog.

Valid use-cases are e.g.
 Plugin Preset Name entry on top of a PluginWindow
 Export Format Settings on top of the Export Dialog

Alternatively one would need to patch gtk to handle
[NSView shouldDelayWindowOrderingForEvent] and explicitly reorder
siblings of a common parent window.

This fixes an issue that plugin windows cannot be re-stacked but were
previously always stacked in the order they were opened.
This commit is contained in:
Robin Gareus 2022-11-15 03:07:43 +01:00
parent f107c063e7
commit d1b462c213
5 changed files with 10 additions and 6 deletions

View file

@ -685,7 +685,9 @@ TriggerClipPicker::open_dir ()
{
Gtk::Window* tlw = dynamic_cast<Gtk::Window*> (get_toplevel ());
assert (tlw);
#ifndef __APPLE__
_fcd.set_transient_for (*tlw);
#endif
int result = _fcd.run ();
_fcd.hide ();