visual state patches from 2.X

git-svn-id: svn://localhost/ardour2/branches/3.0@5712 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2009-10-01 20:52:07 +00:00
parent 3b54a75aa9
commit 8aa1dfca05
2 changed files with 8 additions and 3 deletions

View File

@ -6600,7 +6600,12 @@ Editor::cancel_visual_state_op (uint32_t n)
if (!visual_state_op_connection.empty()) {
visual_state_op_connection.disconnect();
goto_visual_state (n);
}
} else {
//we land here if called from the menu OR if end_visual_state_op has been called
//so check if we are already in visual state n
// XXX not yet checking it at all, but redoing does not hurt
goto_visual_state (n);
}
}
bool

View File

@ -236,7 +236,7 @@ Keyboard::snooper (GtkWidget *widget, GdkEventKey *event)
const AccelKey& ak (k->first);
if (keyval == ak.get_key() && (Gdk::ModifierType)(event->state | Gdk::RELEASE_MASK) == ak.get_mod()) {
if (keyval == ak.get_key() && (Gdk::ModifierType)((event->state & Keyboard::RelevantModifierKeyMask) | Gdk::RELEASE_MASK) == ak.get_mod()) {
cerr << "Suppress auto repeat\n";
ret = true;
break;
@ -258,7 +258,7 @@ Keyboard::snooper (GtkWidget *widget, GdkEventKey *event)
const AccelKey& ak (k->first);
two_strings ts (k->second);
if (keyval == ak.get_key() && (Gdk::ModifierType)(event->state | Gdk::RELEASE_MASK) == ak.get_mod()) {
if (keyval == ak.get_key() && (Gdk::ModifierType)((event->state & Keyboard::RelevantModifierKeyMask) | Gdk::RELEASE_MASK) == ak.get_mod()) {
Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (ts.first.c_str(), ts.second.c_str());
if (act) {
act->activate();