+ canvas_allocation = alloc;
+
+ if (!initial_ruler_update_required) {
+ if (!canvas_idle_queued) {
+ /* call this first so that we do stuff before any pending redraw */
+ Glib::signal_idle().connect (mem_fun (*this, &Editor::track_canvas_idle), false);
+ canvas_idle_queued = true;
+ }
+ return;
+ }
+
+ initial_ruler_update_required = false;
+
+ track_canvas_idle ();
+}
+
+bool
+Editor::track_canvas_idle ()
+{
+ if (canvas_idle_queued) {
+ canvas_idle_queued = false;
+ }
+
+ canvas_width = canvas_allocation.get_width();
+ canvas_height = canvas_allocation.get_height();
+
+ full_canvas_height = canvas_height;