mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-23 15:16:25 +01:00
add a check on the event type passed to start Drags
Drags should always be started by a button press event.
This commit is contained in:
parent
25b830b032
commit
76fa75cf9a
1 changed files with 5 additions and 0 deletions
|
|
@ -346,6 +346,11 @@ Drag::set_grab_button_anyway (GdkEvent* ev)
|
||||||
void
|
void
|
||||||
Drag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
|
Drag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
|
||||||
{
|
{
|
||||||
|
if (event->type != GDK_BUTTON_PRESS) {
|
||||||
|
fatal << "Drag started with non-button-press event (" << event_type_string (event->type) << ')' << endmsg;
|
||||||
|
/*NOTREACHED*/
|
||||||
|
}
|
||||||
|
|
||||||
/* we set up x/y dragging constraints on first move */
|
/* we set up x/y dragging constraints on first move */
|
||||||
_constraint_pressed = ArdourKeyboard::indicates_constraint (event->button.state);
|
_constraint_pressed = ArdourKeyboard::indicates_constraint (event->button.state);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue