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...
This commit is contained in:
parent
f4141d6942
commit
e55ceea11a
1 changed files with 29 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue