mirror of https://github.com/GNOME/gimp.git
removed GimpTool::cursor_update() implementation (which was there only to
2004-01-02 Michael Natterer <mitch@gimp.org> * app/tools/gimppainttool.c: removed GimpTool::cursor_update() implementation (which was there only to stop drawing the brush preview when the mouse leaves the canvas). Instead, look at shell->proximity in GimpTool::oper_update() and just don't start drawing the preview if proximity is FALSE. * app/display/gimpdisplay.c (gimp_display_delete): set gdisp->shell to NULL *before* gtk_widget_destroy()ing the shell so our tool callbacks don't dispatch stuff while the shell is in the middle of being destroyed. Both changes fix bug #129374, though the latter is the fix for the real problem.
This commit is contained in:
parent
eeb0f8dc32
commit
84458f5b95
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
|||
2004-01-02 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/tools/gimppainttool.c: removed GimpTool::cursor_update()
|
||||
implementation (which was there only to stop drawing the brush
|
||||
preview when the mouse leaves the canvas). Instead, look at
|
||||
shell->proximity in GimpTool::oper_update() and just don't start
|
||||
drawing the preview if proximity is FALSE.
|
||||
|
||||
* app/display/gimpdisplay.c (gimp_display_delete): set
|
||||
gdisp->shell to NULL *before* gtk_widget_destroy()ing the shell so
|
||||
our tool callbacks don't dispatch stuff while the shell is in the
|
||||
middle of being destroyed.
|
||||
|
||||
Both changes fix bug #129374, though the latter is the fix for the
|
||||
real problem.
|
||||
|
||||
2003-12-31 Simon Budig <simon@gimp.org>
|
||||
|
||||
* app/core/gimpdrawable-stroke.c
|
||||
|
|
|
@ -273,8 +273,14 @@ gimp_display_delete (GimpDisplay *gdisp)
|
|||
|
||||
if (gdisp->shell)
|
||||
{
|
||||
gtk_widget_destroy (gdisp->shell);
|
||||
GtkWidget *shell = gdisp->shell;
|
||||
|
||||
/* set gdisp->shell to NULL *before* destroying the shell.
|
||||
* all callbacks in gimpdisplayshell-callbacks.c will check
|
||||
* this pointer and do nothing if the shell is in destruction.
|
||||
*/
|
||||
gdisp->shell = NULL;
|
||||
gtk_widget_destroy (shell);
|
||||
}
|
||||
|
||||
/* unrefs the gimage */
|
||||
|
|
|
@ -273,8 +273,14 @@ gimp_display_delete (GimpDisplay *gdisp)
|
|||
|
||||
if (gdisp->shell)
|
||||
{
|
||||
gtk_widget_destroy (gdisp->shell);
|
||||
GtkWidget *shell = gdisp->shell;
|
||||
|
||||
/* set gdisp->shell to NULL *before* destroying the shell.
|
||||
* all callbacks in gimpdisplayshell-callbacks.c will check
|
||||
* this pointer and do nothing if the shell is in destruction.
|
||||
*/
|
||||
gdisp->shell = NULL;
|
||||
gtk_widget_destroy (shell);
|
||||
}
|
||||
|
||||
/* unrefs the gimage */
|
||||
|
|
|
@ -103,10 +103,6 @@ static void gimp_paint_tool_oper_update (GimpTool *tool,
|
|||
GimpCoords *coords,
|
||||
GdkModifierType state,
|
||||
GimpDisplay *gdisp);
|
||||
static void gimp_paint_tool_cursor_update (GimpTool *tool,
|
||||
GimpCoords *coords,
|
||||
GdkModifierType state,
|
||||
GimpDisplay *gdisp);
|
||||
|
||||
static void gimp_paint_tool_draw (GimpDrawTool *draw_tool);
|
||||
|
||||
|
@ -176,7 +172,6 @@ gimp_paint_tool_class_init (GimpPaintToolClass *klass)
|
|||
tool_class->arrow_key = gimp_paint_tool_arrow_key;
|
||||
tool_class->modifier_key = gimp_paint_tool_modifier_key;
|
||||
tool_class->oper_update = gimp_paint_tool_oper_update;
|
||||
tool_class->cursor_update = gimp_paint_tool_cursor_update;
|
||||
|
||||
draw_tool_class->draw = gimp_paint_tool_draw;
|
||||
|
||||
|
@ -664,7 +659,9 @@ gimp_paint_tool_oper_update (GimpTool *tool,
|
|||
tool->gdisp = gdisp;
|
||||
}
|
||||
|
||||
if ((drawable = gimp_image_active_drawable (gdisp->gimage)))
|
||||
drawable = gimp_image_active_drawable (gdisp->gimage);
|
||||
|
||||
if (drawable && shell->proximity)
|
||||
{
|
||||
paint_tool->brush_x = coords->x;
|
||||
paint_tool->brush_y = coords->y;
|
||||
|
@ -732,30 +729,6 @@ gimp_paint_tool_oper_update (GimpTool *tool,
|
|||
GIMP_TOOL_CLASS (parent_class)->oper_update (tool, coords, state, gdisp);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_paint_tool_cursor_update (GimpTool *tool,
|
||||
GimpCoords *coords,
|
||||
GdkModifierType state,
|
||||
GimpDisplay *gdisp)
|
||||
{
|
||||
if (gimp_image_active_drawable (gdisp->gimage))
|
||||
{
|
||||
GimpDrawTool *draw_tool;
|
||||
GimpDisplayShell *shell;
|
||||
|
||||
draw_tool = GIMP_DRAW_TOOL (tool);
|
||||
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
|
||||
|
||||
if (! shell->proximity &&
|
||||
gimp_draw_tool_is_active (draw_tool))
|
||||
{
|
||||
gimp_draw_tool_stop (draw_tool);
|
||||
}
|
||||
}
|
||||
|
||||
GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, gdisp);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_paint_tool_draw (GimpDrawTool *draw_tool)
|
||||
{
|
||||
|
|
|
@ -103,10 +103,6 @@ static void gimp_paint_tool_oper_update (GimpTool *tool,
|
|||
GimpCoords *coords,
|
||||
GdkModifierType state,
|
||||
GimpDisplay *gdisp);
|
||||
static void gimp_paint_tool_cursor_update (GimpTool *tool,
|
||||
GimpCoords *coords,
|
||||
GdkModifierType state,
|
||||
GimpDisplay *gdisp);
|
||||
|
||||
static void gimp_paint_tool_draw (GimpDrawTool *draw_tool);
|
||||
|
||||
|
@ -176,7 +172,6 @@ gimp_paint_tool_class_init (GimpPaintToolClass *klass)
|
|||
tool_class->arrow_key = gimp_paint_tool_arrow_key;
|
||||
tool_class->modifier_key = gimp_paint_tool_modifier_key;
|
||||
tool_class->oper_update = gimp_paint_tool_oper_update;
|
||||
tool_class->cursor_update = gimp_paint_tool_cursor_update;
|
||||
|
||||
draw_tool_class->draw = gimp_paint_tool_draw;
|
||||
|
||||
|
@ -664,7 +659,9 @@ gimp_paint_tool_oper_update (GimpTool *tool,
|
|||
tool->gdisp = gdisp;
|
||||
}
|
||||
|
||||
if ((drawable = gimp_image_active_drawable (gdisp->gimage)))
|
||||
drawable = gimp_image_active_drawable (gdisp->gimage);
|
||||
|
||||
if (drawable && shell->proximity)
|
||||
{
|
||||
paint_tool->brush_x = coords->x;
|
||||
paint_tool->brush_y = coords->y;
|
||||
|
@ -732,30 +729,6 @@ gimp_paint_tool_oper_update (GimpTool *tool,
|
|||
GIMP_TOOL_CLASS (parent_class)->oper_update (tool, coords, state, gdisp);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_paint_tool_cursor_update (GimpTool *tool,
|
||||
GimpCoords *coords,
|
||||
GdkModifierType state,
|
||||
GimpDisplay *gdisp)
|
||||
{
|
||||
if (gimp_image_active_drawable (gdisp->gimage))
|
||||
{
|
||||
GimpDrawTool *draw_tool;
|
||||
GimpDisplayShell *shell;
|
||||
|
||||
draw_tool = GIMP_DRAW_TOOL (tool);
|
||||
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
|
||||
|
||||
if (! shell->proximity &&
|
||||
gimp_draw_tool_is_active (draw_tool))
|
||||
{
|
||||
gimp_draw_tool_stop (draw_tool);
|
||||
}
|
||||
}
|
||||
|
||||
GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, gdisp);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_paint_tool_draw (GimpDrawTool *draw_tool)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue