13
0

mackie: check modifier bits for button AFTER identifying possibly remapped button ID

This commit is contained in:
Paul Davis 2017-01-31 18:08:44 +01:00
parent efd222afe9
commit 7c517f6566

View File

@ -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));