From: Robin Gareus Date: Sat, 4 Jan 2014 15:28:00 +0000 (+0100) Subject: fix dragging playhead using time rulers X-Git-Tag: 1.0.0~997 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=4f465d37b3c2506f00a3dbc7d2191a887ea91a2d;p=ardour.git fix dragging playhead using time rulers --- diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc index 27a13a94b7..865a555c8a 100644 --- a/gtk2_ardour/editor_rulers.cc +++ b/gtk2_ardour/editor_rulers.cc @@ -324,7 +324,11 @@ Editor::ruler_mouse_motion (GdkEventMotion* ev) } if (_drags->active ()) { - _drags->window_motion_handler (reinterpret_cast (ev), false); + GdkEventMotion canvas_ev = *ev; + ArdourCanvas::Duple d = _track_canvas->window_to_canvas (ArdourCanvas::Duple (ev->x, ev->y)); + canvas_ev.x = rint (d.x); + canvas_ev.y = rint (d.y); + _drags->window_motion_handler (reinterpret_cast (&canvas_ev), false); } return true;