fix incorrect restoration of pane positions on Apple.
[ardour.git] / libs / gtkmm2ext / pane.cc
index 5926809a5518b7c7ac699650347c2bb4d7a5ab1e..867912d540a094a0f56fc1628cac8663ef10346f 100644 (file)
@@ -167,6 +167,7 @@ Pane::on_remove (Widget* w)
 void
 Pane::on_size_allocate (Gtk::Allocation& alloc)
 {
+       std::cerr << "pane @ " << this << " reallocated as " << alloc.get_width() << " x " << alloc.get_height() << std::endl;
        reallocate (alloc);
        Container::on_size_allocate (alloc);
 }
@@ -357,6 +358,15 @@ Pane::fract_is_ok (Dividers::size_type div, float fract)
                return true;
        }
 
+
+       if (get_allocation().get_width() == 1 && get_allocation().get_height() == 1) {
+               /* space not * allocated - * divider being set from startup code. Let it pass,
+                  since our goal is mostly to catch drags to a position that will interfere with window
+                  resizing.
+               */
+               return true;
+       }
+
        /* On Quartz, if the pane handle (divider) gets to
           be adjacent to the window edge, you can no longer grab it:
           any attempt to do so is interpreted by the Quartz window