summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/keyboard.cc3
-rw-r--r--gtk2_ardour/keyboard.h7
2 files changed, 10 insertions, 0 deletions
diff --git a/gtk2_ardour/keyboard.cc b/gtk2_ardour/keyboard.cc
index bdce6badda..96c73f63d4 100644
--- a/gtk2_ardour/keyboard.cc
+++ b/gtk2_ardour/keyboard.cc
@@ -242,6 +242,9 @@ ArdourKeyboard::set_state (const XMLNode& node, int version)
return Keyboard::set_state (node, version);
}
+/* Snap and snap delta modifiers may contain each other, so we use the
+ * following two methods to sort that out:
+ */
bool
ArdourKeyboard::indicates_snap (guint state)
{
diff --git a/gtk2_ardour/keyboard.h b/gtk2_ardour/keyboard.h
index b163bfaa37..9ca60950bb 100644
--- a/gtk2_ardour/keyboard.h
+++ b/gtk2_ardour/keyboard.h
@@ -41,7 +41,14 @@ class ArdourKeyboard : public Gtkmm2ext::Keyboard
ARDOUR_UI& ui;
+ /** @param state The button state from a GdkEvent.
+ * @return true if the modifier state indicates snap modifier
+ */
static bool indicates_snap (guint state);
+
+ /** @param state The button state from a GdkEvent.
+ * @return true if the modifier state indicates snap delta
+ */
static bool indicates_snap_delta (guint state);
static void set_constraint_modifier (guint);