13
0

fix playhead dragging from rulers

This commit is contained in:
Paul Davis 2013-04-17 15:29:03 -04:00
parent 3737f346ee
commit fce1733808
3 changed files with 20 additions and 1 deletions

View File

@ -178,6 +178,24 @@ DragManager::motion_handler (GdkEvent* e, bool from_autoscroll)
return r;
}
bool
DragManager::window_motion_handler (GdkEvent* e, bool from_autoscroll)
{
bool r = false;
_current_pointer_frame = _editor->window_event_frame (e, &_current_pointer_x, &_current_pointer_y);
for (list<Drag*>::iterator i = _drags.begin(); i != _drags.end(); ++i) {
bool const t = (*i)->motion_handler (e, from_autoscroll);
if (t) {
r = true;
}
}
return r;
}
bool
DragManager::have_item (ArdourCanvas::Item* i) const
{

View File

@ -54,6 +54,7 @@ public:
~DragManager ();
bool motion_handler (GdkEvent *, bool);
bool window_motion_handler (GdkEvent *, bool);
void abort ();
void add (Drag *);

View File

@ -314,7 +314,7 @@ Editor::ruler_mouse_motion (GdkEventMotion* ev)
}
if (_drags->active ()) {
_drags->motion_handler (reinterpret_cast<GdkEvent*> (ev), false);
_drags->window_motion_handler (reinterpret_cast<GdkEvent*> (ev), false);
}
return true;