diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2017-01-31 18:08:44 +0100 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2017-01-31 18:08:44 +0100 |
commit | 7c517f65660b0b6300cb69588ddb0a5d287f565a (patch) | |
tree | 15374a905af22e7acf717c9f71aa582d5e5d8a72 /libs | |
parent | efd222afe99590919edb3f6eb77569b8bc2d7572 (diff) |
mackie: check modifier bits for button AFTER identifying possibly remapped button ID
Diffstat (limited to 'libs')
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.cc | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index f57d3a7e8c..5ee8d31f85 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -1539,14 +1539,6 @@ MackieControlProtocol::handle_button_event (Surface& surface, Button& button, Bu return; } - if ((button_id != Button::Marker) && (modifier_state() & MODIFIER_MARKER)) { - marker_modifier_consumed_by_button = true; - } - - if ((button_id != Button::Nudge) && (modifier_state() & MODIFIER_NUDGE)) { - nudge_modifier_consumed_by_button = true; - } - DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Handling %1 for button %2 (%3)\n", (bs == press ? "press" : "release"), button.id(), Button::id_to_name (button.bid()))); @@ -1596,6 +1588,18 @@ MackieControlProtocol::handle_button_event (Surface& surface, Button& button, Bu } } + /* Now that we have the correct (maybe remapped) button ID, do these + * checks on it. + */ + + if ((button_id != Button::Marker) && (modifier_state() & MODIFIER_MARKER)) { + marker_modifier_consumed_by_button = true; + } + + if ((button_id != Button::Nudge) && (modifier_state() & MODIFIER_NUDGE)) { + nudge_modifier_consumed_by_button = true; + } + /* lookup using the device-INDEPENDENT button ID */ DEBUG_TRACE (DEBUG::MackieControl, string_compose ("now looking up button ID %1\n", button_id)); |