corrected the value ranges and default values for GDK_AXIS_XTILT and

2004-02-23  Simon Budig  <simon@gimp.org>

	* app/display/gimpdisplayshell-callbacks.c: corrected the
	value ranges and default values for GDK_AXIS_XTILT and
	GDK_AXIS_YTILT. Now the ink-tool behaves sane with a mouse
	again  :)
This commit is contained in:
Simon Budig 2004-02-23 20:30:44 +00:00 committed by Simon Budig
parent 00c35dad74
commit 8b18fc8547
2 changed files with 15 additions and 8 deletions

View File

@ -1,3 +1,10 @@
2004-02-23 Simon Budig <simon@gimp.org>
* app/display/gimpdisplayshell-callbacks.c: corrected the
value ranges and default values for GDK_AXIS_XTILT and
GDK_AXIS_YTILT. Now the ink-tool behaves sane with a mouse
again :)
2004-02-23 Simon Budig <simon@gimp.org>
* app/tools/gimpinktool-blob.c: don't access the array before

View File

@ -1548,14 +1548,14 @@ gimp_display_shell_get_event_coords (GimpDisplayShell *shell,
coords->pressure = 1.0;
if (gdk_event_get_axis (event, GDK_AXIS_XTILT, &coords->xtilt))
coords->xtilt = CLAMP (coords->xtilt, 0.0, 1.0);
coords->xtilt = CLAMP (coords->xtilt, -1.0, 1.0);
else
coords->xtilt = 0.5;
coords->xtilt = 0.0;
if (gdk_event_get_axis (event, GDK_AXIS_YTILT, &coords->ytilt))
coords->ytilt = CLAMP (coords->ytilt, 0.0, 1.0);
coords->ytilt = CLAMP (coords->ytilt, -1.0, 1.0);
else
coords->ytilt = 0.5;
coords->ytilt = 0.0;
if (gdk_event_get_axis (event, GDK_AXIS_WHEEL, &coords->wheel))
coords->wheel = CLAMP (coords->wheel, 0.0, 1.0);
@ -1593,14 +1593,14 @@ gimp_display_shell_get_device_coords (GimpDisplayShell *shell,
coords->pressure = 1.0;
if (gdk_device_get_axis (device, axes, GDK_AXIS_XTILT, &coords->xtilt))
coords->xtilt = CLAMP (coords->xtilt, 0.0, 1.0);
coords->xtilt = CLAMP (coords->xtilt, -1.0, 1.0);
else
coords->xtilt = 0.5;
coords->xtilt = 0.0;
if (gdk_device_get_axis (device, axes, GDK_AXIS_YTILT, &coords->ytilt))
coords->ytilt = CLAMP (coords->ytilt, 0.0, 1.0);
coords->ytilt = CLAMP (coords->ytilt, -1.0, 1.0);
else
coords->ytilt = 0.5;
coords->ytilt = 0.0;
if (gdk_device_get_axis (device, axes, GDK_AXIS_WHEEL, &coords->wheel))
coords->wheel = CLAMP (coords->wheel, 0.0, 1.0);