Commit 67ba6215 authored by Michael Natterer's avatar Michael Natterer 😴
Browse files

app: fix and improve text style overlay keyboard interaction

- app/widgets/gimptextstyleeditor.c: don't block all key events so
  they can reach the canvas.

- app/display/gimpdisplayshell-callbacks.c: instead, ignore canvas key
  events when the canvas has no focus.

This fixes navigating out of the text style editor with TAB, moving
focus to the canvas. I have no clue why navigating *between* the
widgets in the style editor doesn't work.
parent 4ceb7284
......@@ -657,11 +657,14 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
/* ignore events on overlays, but make sure key events go through
* anyway because they are always originating from the toplevel
if (event->type != GDK_KEY_PRESS &&
event->type != GDK_KEY_RELEASE &&
((GdkEventAny *) event)->window != gtk_widget_get_window (canvas))
if (((GdkEventAny *) event)->window != gtk_widget_get_window (canvas))
return FALSE;
if ((event->type != GDK_KEY_PRESS &&
event->type != GDK_KEY_RELEASE) ||
! gtk_widget_has_focus (canvas))
return FALSE;
display = shell->display;
......@@ -167,14 +167,6 @@ gimp_text_style_editor_init (GimpTextStyleEditor *editor)
GtkWidget *image;
/* don't let unhandled key events drop through to the text editor */
g_signal_connect_after (editor, "key-press-event",
G_CALLBACK (gtk_true),
g_signal_connect_after (editor, "key-release-event",
G_CALLBACK (gtk_false),
/* upper row */
editor->upper_hbox = gtk_hbox_new (FALSE, 0);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment