app: stop alt-right click brush size change when releasing Alt first.

Until now, it was only stopiing when releasing right click, but it's
actually more accurate when releasing the Alt key first as the button is
on the mouse/stylus (so releasing it can provoke small hand moves,
especially visible with stylus, I think). Now it stops whatever is
released first.
This commit is contained in:
Jehan 2022-02-15 12:18:42 +01:00
parent 43f0147bfe
commit b1124770e8
1 changed files with 12 additions and 7 deletions

View File

@ -541,7 +541,6 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
}
else if (mod_state == GDK_MOD1_MASK)
{
shell->mod1_settings = TRUE;
gimp_display_shell_start_scrolling (shell, event, state,
bevent->x, bevent->y);
}
@ -1099,8 +1098,9 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
active_tool = tool_manager_get_active (gimp);
if (gimp_display_shell_key_to_state (kevent->keyval) == GDK_MOD1_MASK &&
shell->picked_layer)
if (gimp_display_shell_key_to_state (kevent->keyval) == GDK_MOD1_MASK)
{
if (shell->picked_layer)
{
GimpStatusbar *statusbar;
@ -1109,6 +1109,11 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
shell->picked_layer = NULL;
}
else if (shell->mod1_settings)
{
gimp_display_shell_stop_scrolling (shell, event);
}
}
if ((state & GDK_BUTTON1_MASK) &&
(! shell->space_release_pending ||