summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2017-02-09 16:27:16 +0100
committerPaul Davis <paul@linuxaudiosystems.com>2017-02-09 16:27:16 +0100
commitab105314fb7666b9637dc456fcb6a588ca9fdfb3 (patch)
tree53baa2eb62c078a6ce635193212ea5dd0e464d25
parent8243aeb3a17d4bf3b7a2b7527d530c69c2161bf0 (diff)
when considering whether or not to autoscroll teh canvas, first translate allocation boundary into toplevel coordinates
-rw-r--r--gtk2_ardour/editor_canvas.cc19
1 files changed, 17 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc
index f847a3f707..2a6230ad8d 100644
--- a/gtk2_ardour/editor_canvas.cc
+++ b/gtk2_ardour/editor_canvas.cc
@@ -512,6 +512,16 @@ Editor::maybe_autoscroll (bool allow_horiz, bool allow_vert, bool from_headers)
if (from_headers) {
alloc = controls_layout.get_allocation ();
+
+ int wx, wy;
+
+ controls_layout.get_parent()->translate_coordinates (*toplevel,
+ alloc.get_x(), alloc.get_y(),
+ wx, wy);
+
+ scrolling_boundary = ArdourCanvas::Rect (wx, wy, wx + alloc.get_width(), wy + alloc.get_height());
+
+
} else {
alloc = _track_canvas_viewport->get_allocation ();
@@ -542,9 +552,14 @@ Editor::maybe_autoscroll (bool allow_horiz, bool allow_vert, bool from_headers)
alloc.set_x (alloc.get_x() + 10);
}
- }
+ int wx, wy;
- scrolling_boundary = ArdourCanvas::Rect (alloc.get_x(), alloc.get_y(), alloc.get_x() + alloc.get_width(), alloc.get_y() + alloc.get_height());
+ _track_canvas_viewport->get_parent()->translate_coordinates (*toplevel,
+ alloc.get_x(), alloc.get_y(),
+ wx, wy);
+
+ scrolling_boundary = ArdourCanvas::Rect (wx, wy, wx + alloc.get_width(), wy + alloc.get_height());
+ }
int x, y;
Gdk::ModifierType mask;