summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-07-18 12:49:26 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-07-18 12:49:36 -0400
commitb8f5306d5bf59ddb237fabcdbab91a7d1e6fd612 (patch)
tree837565597f3e1b37665f5dface411e3e45e159d1
parent1364cd6a305e9e73f6b4632e8c842c00eaa55d07 (diff)
fix incorrect restoration of pane positions on Apple.
Code to check if we were to close to an edge (for window resizing) blocked all divider setting, because it would be called with a current widget allocation of 1x1
-rw-r--r--libs/gtkmm2ext/pane.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/gtkmm2ext/pane.cc b/libs/gtkmm2ext/pane.cc
index 5926809a55..867912d540 100644
--- a/libs/gtkmm2ext/pane.cc
+++ b/libs/gtkmm2ext/pane.cc
@@ -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