added new local state "gboolean force_cursor_updating" which makes the

2004-03-10  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_canvas_tool_events): added new local state
	"gboolean force_cursor_updating" which makes the function call
	tool_manger_cursor_update_active() even though a mouse button is
	pressed. Fixes tool cursors in click-to-focus mode.  Reported by
	Michael Schumacher.
This commit is contained in:
Michael Natterer 2004-03-10 17:41:41 +00:00 committed by Michael Natterer
parent c5fc9603f2
commit a15f6489e8
2 changed files with 21 additions and 5 deletions

View file

@ -1,3 +1,12 @@
2004-03-10 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_tool_events): added new local state
"gboolean force_cursor_updating" which makes the function call
tool_manger_cursor_update_active() even though a mouse button is
pressed. Fixes tool cursors in click-to-focus mode. Reported by
Michael Schumacher.
2004-03-10 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c

View file

@ -470,8 +470,9 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
GimpCoords image_coords;
GdkModifierType state;
guint32 time;
gboolean return_val = FALSE;
gboolean update_cursor = FALSE;
gboolean return_val = FALSE;
gboolean update_cursor = FALSE;
gboolean force_cursor_updating = FALSE;
static GimpToolInfo *space_shaded_tool = NULL;
@ -640,6 +641,11 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
&image_coords, state,
gdisp);
/* call the tool's update_cursor() method even though
* GDK_BUTTON1_MASK is set
*/
force_cursor_updating = TRUE;
shell->button_press_before_focus = TRUE;
/* we expect a FOCUS_IN event to follow, but can't rely
@ -1245,9 +1251,10 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
{
if ((! gimp_image_is_empty (gimage) ||
gimp_tool_control_handles_empty_image (active_tool->control)) &&
! (state & (GDK_BUTTON1_MASK |
GDK_BUTTON2_MASK |
GDK_BUTTON3_MASK)))
(force_cursor_updating ||
! (state & (GDK_BUTTON1_MASK |
GDK_BUTTON2_MASK |
GDK_BUTTON3_MASK))))
{
tool_manager_cursor_update_active (gimp,
&image_coords, state,