mirror of https://github.com/GNOME/gimp.git
app/display/gimpdisplayshell-callbacks.c
2006-09-12 Michael Natterer <mitch@gimp.org> * app/display/gimpdisplayshell-callbacks.c * app/tools/gimpforegroundselecttool.c * app/tools/gimpmovetool.c * app/tools/gimppainttool.c * app/tools/gimprectangletool.c * app/tools/gimpselectiontool.c * app/tools/gimpsourcetool.c * app/tools/gimpvectortool.c: back out change committed on 2006-08-21 which passed modifier events to tools even while mouse1 was down. This generated way too much unexpected events that would have to be special cased in all tools. Will implement an anternate solution soon.
This commit is contained in:
parent
bc59e06fc5
commit
05cd50c9f6
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
|||
2006-09-12 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/display/gimpdisplayshell-callbacks.c
|
||||
* app/tools/gimpforegroundselecttool.c
|
||||
* app/tools/gimpmovetool.c
|
||||
* app/tools/gimppainttool.c
|
||||
* app/tools/gimprectangletool.c
|
||||
* app/tools/gimpselectiontool.c
|
||||
* app/tools/gimpsourcetool.c
|
||||
* app/tools/gimpvectortool.c: back out change committed on
|
||||
2006-08-21 which passed modifier events to tools even while mouse1
|
||||
was down. This generated way too much unexpected events that would
|
||||
have to be special cased in all tools. Will implement an anternate
|
||||
solution soon.
|
||||
|
||||
2006-09-12 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/widgets/gimpcontainerpopup.c: removed unused includes.
|
||||
|
|
|
@ -116,20 +116,12 @@ gimp_display_shell_events (GtkWidget *widget,
|
|||
if (gimp->busy)
|
||||
return TRUE;
|
||||
|
||||
/* do not process any key events while BUTTON1 is down, except modifier
|
||||
* key events. We do this so that tools don't get interrupted between
|
||||
* button press and button release.
|
||||
/* do not process any key events while BUTTON1 is down. We do this
|
||||
* so tools keep the modifier state they were in when BUTTON1 was
|
||||
* pressed and to prevent accelerators from being invoked.
|
||||
*/
|
||||
if (kevent->state & GDK_BUTTON1_MASK)
|
||||
{
|
||||
if (kevent->keyval == GDK_Shift_L ||
|
||||
kevent->keyval == GDK_Shift_R ||
|
||||
kevent->keyval == GDK_Control_L ||
|
||||
kevent->keyval == GDK_Control_R )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (event->type == GDK_KEY_PRESS)
|
||||
{
|
||||
if (kevent->keyval == GDK_space && shell->space_release_pending)
|
||||
|
|
|
@ -341,18 +341,15 @@ gimp_foreground_select_tool_modifier_key (GimpTool *tool,
|
|||
GdkModifierType state,
|
||||
GimpDisplay *display)
|
||||
{
|
||||
if (! (state & GDK_BUTTON1_MASK))
|
||||
if (key == GDK_CONTROL_MASK)
|
||||
{
|
||||
if (key == GDK_CONTROL_MASK)
|
||||
{
|
||||
GimpForegroundSelectOptions *options;
|
||||
GimpForegroundSelectOptions *options;
|
||||
|
||||
options = GIMP_FOREGROUND_SELECT_TOOL_GET_OPTIONS (tool);
|
||||
options = GIMP_FOREGROUND_SELECT_TOOL_GET_OPTIONS (tool);
|
||||
|
||||
g_object_set (options,
|
||||
"background", ! options->background,
|
||||
NULL);
|
||||
}
|
||||
g_object_set (options,
|
||||
"background", ! options->background,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -558,9 +558,6 @@ gimp_move_tool_modifier_key (GimpTool *tool,
|
|||
GimpMoveTool *move = GIMP_MOVE_TOOL (tool);
|
||||
GimpMoveOptions *options = GIMP_MOVE_TOOL_GET_OPTIONS (tool);
|
||||
|
||||
if (state & GDK_BUTTON1_MASK)
|
||||
return;
|
||||
|
||||
if (key == GDK_SHIFT_MASK)
|
||||
{
|
||||
g_object_set (options, "move-current", ! options->move_current, NULL);
|
||||
|
|
|
@ -453,9 +453,6 @@ gimp_paint_tool_modifier_key (GimpTool *tool,
|
|||
GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (tool);
|
||||
GimpDrawTool *draw_tool = GIMP_DRAW_TOOL (tool);
|
||||
|
||||
if (state & GDK_BUTTON1_MASK)
|
||||
return;
|
||||
|
||||
if (key != GDK_CONTROL_MASK)
|
||||
return;
|
||||
|
||||
|
|
|
@ -1398,7 +1398,6 @@ gimp_rectangle_tool_modifier_key (GimpTool *tool,
|
|||
GimpRectangleTool *rectangle = GIMP_RECTANGLE_TOOL (tool);
|
||||
GimpRectangleOptions *options = GIMP_RECTANGLE_TOOL_GET_OPTIONS (tool);
|
||||
|
||||
|
||||
if (press)
|
||||
{
|
||||
if (key == GDK_SHIFT_MASK)
|
||||
|
@ -1829,7 +1828,7 @@ gimp_rectangle_tool_cursor_update (GimpTool *tool,
|
|||
|
||||
rectangle = GIMP_RECTANGLE_TOOL (tool);
|
||||
|
||||
if (tool->display == display && ! (state & GDK_BUTTON1_MASK))
|
||||
if (tool->display == display)
|
||||
{
|
||||
guint function;
|
||||
|
||||
|
|
|
@ -116,9 +116,6 @@ gimp_selection_tool_modifier_key (GimpTool *tool,
|
|||
GimpSelectionTool *selection_tool = GIMP_SELECTION_TOOL (tool);
|
||||
GimpSelectionOptions *options;
|
||||
|
||||
if (state & GDK_BUTTON1_MASK)
|
||||
return;
|
||||
|
||||
options = GIMP_SELECTION_TOOL_GET_OPTIONS (tool);
|
||||
|
||||
if (key == GDK_SHIFT_MASK ||
|
||||
|
|
|
@ -242,15 +242,12 @@ gimp_source_tool_modifier_key (GimpTool *tool,
|
|||
GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (tool);
|
||||
GimpSourceOptions *options = GIMP_SOURCE_TOOL_GET_OPTIONS (tool);
|
||||
|
||||
if (! (state & GDK_BUTTON1_MASK))
|
||||
if (options->use_source && key == GDK_CONTROL_MASK)
|
||||
{
|
||||
if (options->use_source && key == GDK_CONTROL_MASK)
|
||||
{
|
||||
if (press)
|
||||
paint_tool->status = source_tool->status_set_source;
|
||||
else
|
||||
paint_tool->status = source_tool->status_paint;
|
||||
}
|
||||
if (press)
|
||||
paint_tool->status = source_tool->status_set_source;
|
||||
else
|
||||
paint_tool->status = source_tool->status_paint;
|
||||
}
|
||||
|
||||
GIMP_TOOL_CLASS (parent_class)->modifier_key (tool, key, press, state,
|
||||
|
|
|
@ -836,9 +836,6 @@ gimp_vector_tool_modifier_key (GimpTool *tool,
|
|||
GimpVectorTool *vector_tool = GIMP_VECTOR_TOOL (tool);
|
||||
GimpVectorOptions *options = GIMP_VECTOR_TOOL_GET_OPTIONS (tool);
|
||||
|
||||
if (state & GDK_BUTTON1_MASK)
|
||||
return;
|
||||
|
||||
if (key == TOGGLE_MASK)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue