From a0cb61d4111fad95d3b29ebf6f07c3b12f084456 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 13 Jun 2012 21:18:00 +0000 Subject: 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 --- gtk2_ardour/mixer_ui.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gtk2_ardour/mixer_ui.cc') 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("/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; -- cgit v1.2.3