[gimp] app: ignore button releases while another button's action is going on



commit 14d30fd7957b6290102dd4ef38ae437c7050e747
Author: Michael Natterer <mitch gimp org>
Date:   Wed Apr 6 22:30:44 2011 +0200

    app: ignore button releases while another button's action is going on
    
    - ignore button 1 release if we are button-2-scrolling
    - ignore button 2 release if we are not button-2-scrolling

 app/display/gimpdisplayshell-tool-events.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-tool-events.c b/app/display/gimpdisplayshell-tool-events.c
index 6f6c431..6bdd8ea 100644
--- a/app/display/gimpdisplayshell-tool-events.c
+++ b/app/display/gimpdisplayshell-tool-events.c
@@ -646,6 +646,9 @@ gimp_display_shell_canvas_tool_events (GtkWidget        *canvas,
           case 1:
             state &= ~GDK_BUTTON1_MASK;
 
+            if (shell->scrolling)
+              return TRUE;
+
             if (! shell->space_pressed && ! shell->space_release_pending)
               gimp_display_shell_keyboard_ungrab (shell, event);
 
@@ -687,7 +690,8 @@ gimp_display_shell_canvas_tool_events (GtkWidget        *canvas,
 
           case 2:
             state &= ~GDK_BUTTON2_MASK;
-            gimp_display_shell_stop_scrolling (shell);
+            if (shell->scrolling)
+              gimp_display_shell_stop_scrolling (shell);
             break;
 
           case 3:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]