Bug 675549 - image region does not have focus unless clicked on

We cannot simply randomy move the focus from e.g. a text entry back to
the canvas. Instead introduce global handling of "Escape" and a
"primary_focus_widget" that is always set the the image window's
active canvas. When Escape is pressed, move the focus to that primary
focus widget, or beep if it is already there. Text widgets still get
the key events before that logic and can consume the Escape.
This commit is contained in:
Michael Natterer
2013-04-09 15:41:20 +02:00
parent 46f74d9f46
commit 5880685472
3 changed files with 68 additions and 5 deletions

View File

@ -1626,6 +1626,9 @@ gimp_image_window_switch_page (GtkNotebook *notebook,
window, shell);
private->active_shell = shell;
gimp_window_set_primary_focus_widget (GIMP_WINDOW (window),
shell->canvas);
active_display = private->active_shell->display;
g_signal_connect (active_display, "notify::image",