summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-12-07 14:50:17 +0100
committerRobin Gareus <robin@gareus.org>2016-12-07 14:50:17 +0100
commitd7660957325bdebbb75f21c0d19b9f0aad6e7f37 (patch)
tree8cd9d618281dc9237d2a2e97ecba1db20b9fadcd /gtk2_ardour
parent581c7b6b10ac002b39ca1e24b33f3ed65f5c8001 (diff)
Further tweaks to EngineDialog z-axis stacking
When there's no main window (initial setup, no transient parent), preset a normal window listed in the task-bar. The duality the Engine Dialog being used as Ardour-WM managed non-modal Window (Menu > A/M Setup) and modal Dialog (AudioEngineSetupRequired) complicates this a bit.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/engine_dialog.cc20
-rw-r--r--gtk2_ardour/engine_dialog.h1
2 files changed, 15 insertions, 6 deletions
diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc
index a9b4dbdce0..4dc806763f 100644
--- a/gtk2_ardour/engine_dialog.cc
+++ b/gtk2_ardour/engine_dialog.cc
@@ -53,6 +53,7 @@
#include "engine_dialog.h"
#include "gui_thread.h"
#include "ui_config.h"
+#include "public_editor.h"
#include "utils.h"
#include "pbd/i18n.h"
#include "splash.h"
@@ -114,12 +115,6 @@ EngineControl::EngineControl ()
set_name (X_("AudioMIDISetup"));
- if (UIConfiguration::instance().get_all_floating_windows_are_dialogs()) {
- set_type_hint (Gdk::WINDOW_TYPE_HINT_DIALOG);
- } else {
- set_type_hint (Gdk::WINDOW_TYPE_HINT_UTILITY);
- }
-
/* the backend combo is the one thing that is ALWAYS visible */
vector<const ARDOUR::AudioBackendInfo*> backends = ARDOUR::AudioEngine::instance()->available_backends();
@@ -432,6 +427,19 @@ EngineControl::on_show ()
start_stop_button.grab_focus();
}
+void
+EngineControl::on_map ()
+{
+ if (!ARDOUR_UI::instance()->session_loaded && !PublicEditor::_instance) {
+ set_type_hint (Gdk::WINDOW_TYPE_HINT_NORMAL);
+ } else if (UIConfiguration::instance().get_all_floating_windows_are_dialogs()) {
+ set_type_hint (Gdk::WINDOW_TYPE_HINT_DIALOG);
+ } else {
+ set_type_hint (Gdk::WINDOW_TYPE_HINT_UTILITY);
+ }
+ ArdourDialog::on_map ();
+}
+
bool
EngineControl::try_autostart ()
{
diff --git a/gtk2_ardour/engine_dialog.h b/gtk2_ardour/engine_dialog.h
index af13c3f78c..142e1fea18 100644
--- a/gtk2_ardour/engine_dialog.h
+++ b/gtk2_ardour/engine_dialog.h
@@ -304,6 +304,7 @@ class EngineControl : public ArdourDialog, public PBD::ScopedConnectionList {
sigc::connection output_channels_connection;
void on_show ();
+ void on_map ();
void control_app_button_clicked ();
void start_stop_button_clicked ();
void update_devices_button_clicked ();