fix meterbridge window on OSX
authorRobin Gareus <robin@gareus.org>
Sun, 28 Jul 2013 13:54:13 +0000 (15:54 +0200)
committerRobin Gareus <robin@gareus.org>
Sun, 28 Jul 2013 13:54:13 +0000 (15:54 +0200)
gtk2_ardour/meterbridge.cc

index f59fbfd6930d64f61d0348c490d19797a13b17e2..a2bcf5cc0653a3810ddbed3cba012020c2bb8c8c 100644 (file)
@@ -342,6 +342,10 @@ Meterbridge::on_size_request (Gtk::Requisition* r)
        geom.max_width = mr.width + metrics_left.get_width() + metrics_right.get_width();
        geom.max_height = max_height;
 
+#ifndef GTKOSX
+       /* on OSX this leads to a constant live-loop: show/hide scrollbar
+        * on Linux, the window is resized IFF the scrollbar was not visible
+        */
        const Gtk::Scrollbar * hsc = scroller.get_hscrollbar();
        Glib::RefPtr<Gdk::Screen> screen = get_screen ();
        Gdk::Rectangle monitor_rect;
@@ -356,6 +360,7 @@ Meterbridge::on_size_request (Gtk::Requisition* r)
                r->width = geom.max_width;
                r->height = h;
        }
+#endif
 
        if (cur_max_width != geom.max_width) {
                cur_max_width = geom.max_width;