summaryrefslogtreecommitdiff
path: root/gtk2_ardour/mixer_ui.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-06-13 21:18:00 +0000
committerCarl Hetherington <carl@carlh.net>2012-06-13 21:18:00 +0000
commita0cb61d4111fad95d3b29ebf6f07c3b12f084456 (patch)
tree8722fe5916659e99e84a2c35d0bf8de7447060a8 /gtk2_ardour/mixer_ui.cc
parentda6f9ab807d938ec91c78cd7661fbfdfe9aaee73 (diff)
Patch from colinf to fix problems with toggle mixer on top (#2477).
git-svn-id: svn://localhost/ardour2/branches/3.0@12714 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/mixer_ui.cc')
-rw-r--r--gtk2_ardour/mixer_ui.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc
index 60b3f7b0d8..8dd83ad771 100644
--- a/gtk2_ardour/mixer_ui.cc
+++ b/gtk2_ardour/mixer_ui.cc
@@ -1550,6 +1550,18 @@ Mixer_UI::on_key_press_event (GdkEventKey* ev)
}
KeyboardKey k (ev->state, ev->keyval);
+
+ GtkAccelKey key;
+
+ /* Handle toggle-mixer-on-top here, so it can do a different thing if the
+ mixer is already on top and received this key press.
+ */
+ if (gtk_accel_map_lookup_entry("<Actions>/Common/toggle-mixer-on-top", &key)) {
+ if (int (k.state()) == key.accel_mods && k.key() == key.accel_key) {
+ ARDOUR_UI::instance()->goto_editor_window();
+ return true;
+ }
+ }
if (bindings.activate (k, Bindings::Press)) {
return true;