From 76fa75cf9a13e28c09e5e99bcc78fc8065ec2353 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 27 Dec 2024 14:09:11 -0700 Subject: [PATCH] add a check on the event type passed to start Drags Drags should always be started by a button press event. --- gtk2_ardour/editor_drag.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 68dc02bfbe..f5fbf6cf20 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -346,6 +346,11 @@ Drag::set_grab_button_anyway (GdkEvent* ev) void 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 */ _constraint_pressed = ArdourKeyboard::indicates_constraint (event->button.state);