use GDK event mask for Alt, rather than attempt platform-specific translation from ardour codebase meta-modifiers

This commit is contained in:
Paul Davis 2014-11-19 08:26:35 -05:00
parent da486905be
commit 52f77a562b

View file

@ -63,12 +63,6 @@ using namespace std;
using Gtkmm2ext::Keyboard;
using namespace ArdourMeter;
#if defined(__APPLE__)
#define ALT_OPTION (Keyboard::Level4Modifier)
#elif defined(PLATFORM_WINDOWS)
#define ALT_OPTION (Keyboard::SecondaryModifier)
#endif
GainMeter::GainMeter (Session* s, const std::string& layout_script_file)
: Gtk::VBox ()
, WavesUI (layout_script_file, *this)
@ -303,7 +297,8 @@ GainMeter::gain_display_button_press (GdkEventButton* ev)
{
switch (ev->type) {
case GDK_BUTTON_PRESS:
if (Keyboard::modifier_state_contains (ev->state, ALT_OPTION)) {
/* MOD1 == "Alt" */
if (Keyboard::modifier_state_contains (ev->state, GDK_MOD1_MASK)) {
_amp->set_gain (dB_to_coefficient(0.0), this);
}
break;
@ -687,7 +682,7 @@ GainMeter::gain_slider_button_press (GdkEventButton* ev)
{
switch (ev->type) {
case GDK_BUTTON_PRESS:
if (Keyboard::modifier_state_contains (ev->state, ALT_OPTION)) {
if (Keyboard::modifier_state_contains (ev->state, GDK_MOD1_MASK)) {
_amp->set_gain (dB_to_coefficient(0.0), this);
return true;
}