summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-12-11 01:17:23 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-12-11 01:17:23 +0000
commitcb55bd1a52158a7ee8784ad58582252b7ab0b06c (patch)
treefdb1c2d653e513997984af7a0b7640ac9f79851d
parent676c4e281cf63a221419651457b3e52b79a0f386 (diff)
do not show the mixer window if the (current) screen height is < 700 pixels (since this results in a very, very irritating situation)
git-svn-id: svn://localhost/ardour2/branches/3.0@13635 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/ardour_ui_dependents.cc19
-rw-r--r--gtk2_ardour/editor_mixer.cc2
2 files changed, 20 insertions, 1 deletions
diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc
index 99b27d75d6..b9b0cdb6a2 100644
--- a/gtk2_ardour/ardour_ui_dependents.cc
+++ b/gtk2_ardour/ardour_ui_dependents.cc
@@ -108,6 +108,25 @@ ARDOUR_UI::goto_editor_window ()
void
ARDOUR_UI::goto_mixer_window ()
{
+ if (!editor) {
+ return;
+ }
+
+ Glib::RefPtr<Gdk::Window> win = editor->get_window ();
+ Glib::RefPtr<Gdk::Screen> screen;
+
+ if (win) {
+ screen = win->get_screen();
+ } else {
+ screen = Gdk::Screen::get_default();
+ }
+
+ if (screen && screen->get_height() < 700) {
+ Gtk::MessageDialog msg (_("This screen is not tall enough to display the mixer window"));
+ msg.run ();
+ return;
+ }
+
mixer->show_window ();
mixer->present ();
flush_pending ();
diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc
index b7eb05affc..f63e396ba7 100644
--- a/gtk2_ardour/editor_mixer.cc
+++ b/gtk2_ardour/editor_mixer.cc
@@ -80,7 +80,7 @@ Editor::show_editor_mixer (bool yn)
Glib::RefPtr<Gdk::Window> win = get_window ();
Glib::RefPtr<Gdk::Screen> screen;
- if (get_window()) {
+ if (win) {
screen = win->get_screen();
} else {
screen = Gdk::Screen::get_default();