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

@ -335,7 +335,7 @@ IOPluginWindow::IOPlugUI::edit_plugin (bool custom_ui)
_window_proxy->set_custom_ui_mode (custom_ui);
_window_proxy->show_the_right_window ();
Gtk::Window* tlw = dynamic_cast<Gtk::Window*> (get_toplevel ());
_window_proxy->get ()->set_transient_for (*tlw);
_window_proxy->set_transient_for (*tlw);
}
bool