[gimp/metadata-browser] app: handle MOD2 in GimpTool's generic modifier code
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] app: handle MOD2 in GimpTool's generic modifier code
- Date: Fri, 2 Dec 2011 02:11:16 +0000 (UTC)
commit 5e474d6b16fd28a3c81fcf7d88309a847aaa13e8
Author: Michael Natterer <mitch gimp org>
Date: Thu Oct 6 16:43:23 2011 +0200
app: handle MOD2 in GimpTool's generic modifier code
because we "know" that it's used on the Mac and unfortunately there
is no other way of knowing but simply knowing it...
app/tools/gimptool.c | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/app/tools/gimptool.c b/app/tools/gimptool.c
index 78aa9e1..4be372f 100644
--- a/app/tools/gimptool.c
+++ b/app/tools/gimptool.c
@@ -825,6 +825,13 @@ gimp_tool_set_modifier_state (GimpTool *tool,
display);
}
+ if ((tool->modifier_state & GDK_MOD2_MASK) != (state & GDK_MOD2_MASK))
+ {
+ gimp_tool_modifier_key (tool, GDK_MOD2_MASK,
+ (state & GDK_MOD2_MASK) ? TRUE : FALSE, state,
+ display);
+ }
+
tool->modifier_state = state;
}
@@ -923,6 +930,28 @@ gimp_tool_set_active_modifier_state (GimpTool *tool,
}
}
+ if ((tool->active_modifier_state & GDK_MOD2_MASK) !=
+ (state & GDK_MOD2_MASK))
+ {
+ gboolean press = state & GDK_MOD2_MASK;
+
+#ifdef DEBUG_ACTIVE_STATE
+ g_printerr ("%s: MOD2 %s\n", G_STRFUNC,
+ press ? "pressed" : "released");
+#endif
+
+ if (! press && (tool->button_press_state & GDK_MOD2_MASK))
+ {
+ tool->button_press_state &= ~GDK_MOD2_MASK;
+ }
+ else
+ {
+ gimp_tool_active_modifier_key (tool, GDK_MOD2_MASK,
+ press, state,
+ display);
+ }
+ }
+
tool->active_modifier_state = state;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]