modifiers: implement is_momentary_push_event for momentary buttons (gtk2 part)

This commit is contained in:
Ben Loftis 2022-06-14 16:44:48 -05:00
parent 12e703414d
commit a92af7768d
3 changed files with 6 additions and 6 deletions

View File

@ -4116,7 +4116,7 @@ Mixer_UI::scene_button_press (GdkEventButton* ev, int idx)
popup_scene_menu (ev, idx);
} else if (Keyboard::is_delete_event (ev)) {
clear_mixer_scene (idx, true);
} else if (Keyboard::is_button2_event (ev)) {
} else if (Keyboard::is_momentary_push_event (ev)) {
/* momentary */
delete _mixer_scene_release; // .. or keep existing?
_mixer_scene_release = new MixerScene (*_session);

View File

@ -1669,7 +1669,7 @@ RecorderUI::InputPort::monitor_press (GdkEventButton* ev)
if (Keyboard::is_context_menu_event (ev)) {
return false;
}
if (ev->button != 1 && !Keyboard::is_button2_event (ev)) {
if (ev->button != 1 && !Keyboard::is_momentary_push_event (ev)) {
return false;
}
@ -1677,7 +1677,7 @@ RecorderUI::InputPort::monitor_press (GdkEventButton* ev)
Session* s = AudioEngine::instance()->session ();
assert (s);
if (Keyboard::is_button2_event (ev)) {
if (Keyboard::is_momentary_push_event (ev)) {
/* momentary */
_solo_release = new SoloMuteRelease (mp.monitoring (_port_name));
}

View File

@ -475,7 +475,7 @@ RouteUI::mute_press (GdkEventButton* ev)
} else {
if (Keyboard::is_button2_event (ev)) {
if (Keyboard::is_momentary_push_event (ev)) {
// button2-click is "momentary"
_mute_release = new SoloMuteRelease (_route->mute_control()->muted ());
@ -647,7 +647,7 @@ RouteUI::solo_press(GdkEventButton* ev)
} else {
if (Keyboard::is_button2_event (ev)) {
if (Keyboard::is_momentary_push_event (ev)) {
// button2-click is "momentary"
_solo_release = new SoloMuteRelease (_route->self_soloed());
@ -787,7 +787,7 @@ RouteUI::rec_enable_press(GdkEventButton* ev)
if (is_track() && rec_enable_button) {
if (Keyboard::is_button2_event (ev)) {
if (Keyboard::is_momentary_push_event (ev)) {
//rec arm does not have a momentary mode
return false;