From e406a1bd4133d2b2b95b65cbb36d3a2f6d691c01 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 22 Jul 2021 05:45:18 +0200 Subject: [PATCH] Mark non-modal dialogs as utility windows This addresses an issue with gnome and mate, where dialog windows do not have a window close button, and expect direct interaction with the user "OK/Cancel", "Yes/No", etc. --- gtk2_ardour/ardour_dialog.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gtk2_ardour/ardour_dialog.cc b/gtk2_ardour/ardour_dialog.cc index f04a370aee..8f2df8f681 100644 --- a/gtk2_ardour/ardour_dialog.cc +++ b/gtk2_ardour/ardour_dialog.cc @@ -29,6 +29,7 @@ #include "ardour_ui.h" #include "keyboard.h" #include "splash.h" +#include "ui_config.h" #include "utils.h" #include "window_manager.h" @@ -151,7 +152,16 @@ ArdourDialog::init () { set_border_width (10); add_events (Gdk::FOCUS_CHANGE_MASK); + +#ifdef __APPLE__ set_type_hint (Gdk::WINDOW_TYPE_HINT_DIALOG); +#else + if (UIConfiguration::instance().get_all_floating_windows_are_dialogs () || get_modal ()) { + set_type_hint (Gdk::WINDOW_TYPE_HINT_DIALOG); + } else { + set_type_hint (Gdk::WINDOW_TYPE_HINT_UTILITY); + } +#endif Gtk::Window* parent = WM::Manager::instance().transient_parent();