[gimp/wip/Jehan/issue-498-quick-brush-edit: 3/26] app: stop alt-right click brush size change when releasing Alt first.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/wip/Jehan/issue-498-quick-brush-edit: 3/26] app: stop alt-right click brush size change when releasing Alt first.
- Date: Wed, 17 Aug 2022 12:20:45 +0000 (UTC)
commit b1124770e8b11dea96f2f5094b78e3a2d81a2de0
Author: Jehan <jehan girinstud io>
Date: Tue Feb 15 12:18:42 2022 +0100
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.
app/display/gimpdisplayshell-tool-events.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-tool-events.c b/app/display/gimpdisplayshell-tool-events.c
index 4d1f205d2c..eeb31b2861 100644
--- a/app/display/gimpdisplayshell-tool-events.c
+++ b/app/display/gimpdisplayshell-tool-events.c
@@ -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,15 +1098,21 @@ 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)
{
- GimpStatusbar *statusbar;
+ if (shell->picked_layer)
+ {
+ GimpStatusbar *statusbar;
- statusbar = gimp_display_shell_get_statusbar (shell);
- gimp_statusbar_pop_temp (statusbar);
+ statusbar = gimp_display_shell_get_statusbar (shell);
+ gimp_statusbar_pop_temp (statusbar);
- shell->picked_layer = NULL;
+ shell->picked_layer = NULL;
+ }
+ else if (shell->mod1_settings)
+ {
+ gimp_display_shell_stop_scrolling (shell, event);
+ }
}
if ((state & GDK_BUTTON1_MASK) &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]