diff --git a/libs/widgets/choice.cc b/libs/widgets/choice.cc index da22da92c1..9f2147459d 100644 --- a/libs/widgets/choice.cc +++ b/libs/widgets/choice.cc @@ -18,7 +18,9 @@ */ #include -#include + +#include "widgets/choice.h" +#include "widgets/ui_config.h" using namespace std; using namespace sigc; @@ -34,7 +36,7 @@ Choice::Choice (string title, string prompt, vector choices, bool center if (center) { set_position (Gtk::WIN_POS_CENTER); } else { - set_position (Gtk::WIN_POS_MOUSE); + set_position (UIConfigurationBase::instance().get_default_window_position()); } set_name ("ChoiceWindow"); diff --git a/libs/widgets/tearoff.cc b/libs/widgets/tearoff.cc index 3aaf5f9b2d..5ebbe3c3fe 100644 --- a/libs/widgets/tearoff.cc +++ b/libs/widgets/tearoff.cc @@ -165,7 +165,7 @@ TearOff::tear_it_off () own_window.set_name (get_name()); close_event_box.set_name (get_name()); if (own_window_width == 0) { - own_window.set_position (WIN_POS_MOUSE); + own_window.set_position (UIConfigurationBase::instance().get_default_window_position()); } own_window.show_all (); own_window.present (); diff --git a/libs/widgets/widgets/ui_config.h b/libs/widgets/widgets/ui_config.h index c04d8d4552..0c753a2b5c 100644 --- a/libs/widgets/widgets/ui_config.h +++ b/libs/widgets/widgets/ui_config.h @@ -23,6 +23,8 @@ #include +#include "ytkmm/enums.h" + #include "pbd/configuration.h" #include "gtkmm2ext/colors.h" @@ -52,6 +54,8 @@ public: virtual Pango::FontDescription get_NormalMonospaceFont () const = 0; virtual Pango::FontDescription get_SmallMonospaceFont () const = 0; virtual Pango::FontDescription get_ArdourSmallFont () const = 0; + + virtual Gtk::WindowPosition get_default_window_position() const = 0; }; }