mirror of https://github.com/GNOME/gimp.git
Don't block all key events on the canvas (fixes tool interaction)
(gimp_display_shell_canvas_tool_events): when ignoring events on overlays, special case key events because they always originate from the topelvel and never from the canvas' window itself.
This commit is contained in:
parent
a93cb543ff
commit
ea7c37293c
|
@ -619,9 +619,15 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
|
|||
if (gimp_display_shell_events (canvas, event, shell))
|
||||
return TRUE;
|
||||
|
||||
/* ignore events on overlays */
|
||||
if (((GdkEventAny *) event)->window != canvas->window)
|
||||
return FALSE;
|
||||
/* 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 != canvas->window)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
display = shell->display;
|
||||
gimp = gimp_display_get_gimp (display);
|
||||
|
|
Loading…
Reference in New Issue