mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-01 03:17:39 +01:00
start handling plugin window keyboard focus (in-progress)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4021 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
5adebc96ad
commit
e7cebfb6c5
2 changed files with 13 additions and 1 deletions
|
|
@ -618,6 +618,7 @@ bool
|
|||
AUPluginUI::on_focus_in_event (GdkEventFocus* ev)
|
||||
{
|
||||
cerr << "au plugin focus in\n";
|
||||
Keyboard::magic_widget_grab_focus ();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -625,6 +626,7 @@ bool
|
|||
AUPluginUI::on_focus_out_event (GdkEventFocus* ev)
|
||||
{
|
||||
cerr << "au plugin focus out\n";
|
||||
Keyboard::magic_widget_drop_focus ();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -408,6 +408,9 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
|
|||
GtkWindow* win = window.gobj();
|
||||
GtkWidget* focus = gtk_window_get_focus (win);
|
||||
bool special_handling_of_unmodified_accelerators = false;
|
||||
#ifdef GTKOSX
|
||||
bool allow_forwarding = true;
|
||||
#endif
|
||||
|
||||
#undef DEBUG_ACCELERATOR_HANDLING
|
||||
#ifdef DEBUG_ACCELERATOR_HANDLING
|
||||
|
|
@ -419,6 +422,12 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef GTKOSX
|
||||
if (Keyboard::some_magic_widget_has_focus ()) {
|
||||
allow_forwarding = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_ACCELERATOR_HANDLING
|
||||
if (debug) {
|
||||
cerr << "Win = " << win << " Key event: code = " << ev->keyval << " state = " << hex << ev->state << dec << " special handling ? "
|
||||
|
|
@ -497,8 +506,9 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev)
|
|||
cerr << "\tactivate, then propagate\n";
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef GTKOSX
|
||||
if (gdk_quartz_possibly_forward ((GdkEvent*) ev)) {
|
||||
if (allow_forwarding && gdk_quartz_possibly_forward ((GdkEvent*) ev)) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue