Keep Script Window on top.
[ardour.git] / gtk2_ardour / luawindow.cc
index 76f20178ec093e7aa9542ec907fc8394c3e5cc20..d385b8e3c1edb83bc9d67418e56ed5979e733656 100644 (file)
@@ -50,6 +50,7 @@
 #include "luawindow.h"
 #include "public_editor.h"
 #include "utils.h"
+#include "ui_config.h"
 #include "utils_videotl.h"
 
 #include "pbd/i18n.h"
@@ -108,6 +109,16 @@ LuaWindow::LuaWindow ()
        update_title ();
        set_wmclass (X_("ardour_mixer"), PROGRAM_NAME);
 
+#ifdef __APPLE__
+       set_type_hint (Gdk::WINDOW_TYPE_HINT_DIALOG);
+#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);
+       }
+#endif
+
        script_select.disable_scrolling ();
 
        set_border_width (0);