[gimp] app: merge if() madness into one single even bigger madness
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: merge if() madness into one single even bigger madness
- Date: Fri, 9 Dec 2011 21:35:11 +0000 (UTC)
commit 7da455214d60ecbd6672a14b402e938042a24508
Author: Michael Natterer <mitch gimp org>
Date: Fri Dec 9 22:34:44 2011 +0100
app: merge if() madness into one single even bigger madness
app/display/gimpdisplayshell-tool-events.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-tool-events.c b/app/display/gimpdisplayshell-tool-events.c
index c127e3a..7de6579 100644
--- a/app/display/gimpdisplayshell-tool-events.c
+++ b/app/display/gimpdisplayshell-tool-events.c
@@ -453,13 +453,12 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
state |= gimp_display_shell_button_to_state (bevent->button);
/* ignore new buttons while another button is down */
- 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)))
+ if (((state & (GDK_BUTTON1_MASK)) && (state & (GDK_BUTTON2_MASK |
+ GDK_BUTTON3_MASK))) ||
+ ((state & (GDK_BUTTON2_MASK)) && (state & (GDK_BUTTON1_MASK |
+ GDK_BUTTON3_MASK))) ||
+ ((state & (GDK_BUTTON3_MASK)) && (state & (GDK_BUTTON1_MASK |
+ GDK_BUTTON2_MASK))))
return TRUE;
/* focus the widget if it isn't; if the toplevel window
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]