if a device change happens, make sure we update the new active tool's

2007-12-07  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_tool_events): if a device change happens, make
	sure we update the new active tool's focus display and modifier
	state. Fixes most of bug #493176.


svn path=/trunk/; revision=24288
This commit is contained in:
Michael Natterer 2007-12-07 18:54:46 +00:00 committed by Michael Natterer
parent efda62544d
commit da51309673
2 changed files with 17 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2007-12-07 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_tool_events): if a device change happens, make
sure we update the new active tool's focus display and modifier
state. Fixes most of bug #493176.
2007-12-07 Michael Natterer <mitch@gimp.org>
* app/gimp-log.[ch]: renamed log domain TOOLS to TOOL_EVENTS and

View file

@ -606,6 +606,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
GimpCoords image_coords;
GdkModifierType state;
guint32 time;
gboolean device_changed = FALSE;
gboolean return_val = FALSE;
gboolean update_sw_cursor = FALSE;
@ -629,6 +630,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
if (! gimp->busy && gimp_devices_check_change (gimp, event))
{
gimp_display_shell_check_device_cursor (shell);
device_changed = TRUE;
}
gimp_display_shell_get_event_coords (shell, event,
@ -662,6 +664,14 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
}
}
/* If the device (and maybe the tool) has changed, update the new
* tool's state
*/
if (device_changed && GTK_WIDGET_HAS_FOCUS (canvas))
{
gimp_display_shell_update_focus (shell, &image_coords, state);
}
switch (event->type)
{
case GDK_ENTER_NOTIFY: