mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
likely fix for cases where a button release event falls through from the canvas to the editor, during a drag
The drag code expects coordinates in canvas coordinates, but we were not translating them at the editor level (canvas event handling does do this, but cannot affect the situation if the event falls through to the editor)
This commit is contained in:
parent
4151ec1907
commit
5d1b75bd4f
1 changed files with 9 additions and 1 deletions
|
|
@ -188,7 +188,15 @@ Editor::track_canvas_button_release_event (GdkEventButton *event)
|
|||
{
|
||||
if (!Keyboard::is_context_menu_event (event)) {
|
||||
if (_drags->active ()) {
|
||||
_drags->end_grab ((GdkEvent*) event);
|
||||
|
||||
GdkEvent copy = *((GdkEvent*) event);
|
||||
Duple winpos = Duple (event->x, event->y);
|
||||
Duple where = _track_canvas->window_to_canvas (winpos);
|
||||
|
||||
copy.button.x = where.x;
|
||||
copy.button.y = where.y;
|
||||
|
||||
_drags->end_grab (©);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue