make Editor track canvas grab focus when entered, independent of editing mode

Numerous bindings shared across EditingContexts are attached to the viewport for the canvas; unless
we begin with the canvas and walk up the the widget tree, we will never find them.
This commit is contained in:
Paul Davis
2025-03-02 12:54:41 -07:00
parent d04376bee4
commit 55edfa9a66

View File

@@ -916,13 +916,7 @@ Editor::entered_track_canvas (GdkEventCrossing* ev)
if (!was_within) {
if (internal_editing()) {
/* ensure that key events go here because there are
internal editing bindings associated only with the
canvas. if the focus is elsewhere, we cannot find them.
*/
_track_canvas->grab_focus ();
}
_track_canvas->grab_focus ();
if (ev->detail == GDK_NOTIFY_NONLINEAR ||
ev->detail == GDK_NOTIFY_NONLINEAR_VIRTUAL) {