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:
parent
6c6f2df849
commit
e406a1bd41
@ -29,6 +29,7 @@
|
|||||||
#include "ardour_ui.h"
|
#include "ardour_ui.h"
|
||||||
#include "keyboard.h"
|
#include "keyboard.h"
|
||||||
#include "splash.h"
|
#include "splash.h"
|
||||||
|
#include "ui_config.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "window_manager.h"
|
#include "window_manager.h"
|
||||||
|
|
||||||
@ -151,7 +152,16 @@ ArdourDialog::init ()
|
|||||||
{
|
{
|
||||||
set_border_width (10);
|
set_border_width (10);
|
||||||
add_events (Gdk::FOCUS_CHANGE_MASK);
|
add_events (Gdk::FOCUS_CHANGE_MASK);
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
set_type_hint (Gdk::WINDOW_TYPE_HINT_DIALOG);
|
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();
|
Gtk::Window* parent = WM::Manager::instance().transient_parent();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user