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
@ -188,7 +188,15 @@ Editor::track_canvas_button_release_event (GdkEventButton *event)
|
|||||||
{
|
{
|
||||||
if (!Keyboard::is_context_menu_event (event)) {
|
if (!Keyboard::is_context_menu_event (event)) {
|
||||||
if (_drags->active ()) {
|
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;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user