[gimp] app: improve ignoring other buttons while one down
- From: Alexia Death <alexiade src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: improve ignoring other buttons while one down
- Date: Fri, 9 Dec 2011 21:27:47 +0000 (UTC)
commit 5ec2bd7287c0551c030a348b8b75e8545f5c06da
Author: Alexia Death <alexiadeath gmail com>
Date: Fri Dec 9 23:26:22 2011 +0200
app: improve ignoring other buttons while one down
app/display/gimpdisplayshell-tool-events.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-tool-events.c b/app/display/gimpdisplayshell-tool-events.c
index 32c9656..c127e3a 100644
--- a/app/display/gimpdisplayshell-tool-events.c
+++ b/app/display/gimpdisplayshell-tool-events.c
@@ -447,11 +447,19 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
GimpTool *active_tool;
/* ignore new mouse events */
- if (gimp->busy || shell->scrolling)
+ if (gimp->busy || shell->scrolling || shell->pointer_grabbed)
return TRUE;
+ state |= gimp_display_shell_button_to_state (bevent->button);
+
/* ignore new buttons while another button is down */
- if (state & (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GDK_BUTTON3_MASK))
+ if ((state & (GDK_BUTTON1_MASK)) && (state & (GDK_BUTTON2_MASK | GDK_BUTTON3_MASK)))
+ return TRUE;
+
+ if ((state & (GDK_BUTTON2_MASK)) && (state & (GDK_BUTTON1_MASK | GDK_BUTTON3_MASK)))
+ return TRUE;
+
+ if ((state & (GDK_BUTTON3_MASK)) && (state & (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK)))
return TRUE;
/* focus the widget if it isn't; if the toplevel window
@@ -475,8 +483,6 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
active_tool = tool_manager_get_active (gimp);
- state |= gimp_display_shell_button_to_state (bevent->button);
-
if (gdk_event_triggers_context_menu (event))
{
GimpUIManager *ui_manager;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]