13
0

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.
This commit is contained in:
Robin Gareus 2021-07-22 05:45:18 +02:00
parent 6c6f2df849
commit e406a1bd41
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -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();