Commit 01412f0b authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

clamp scale factor between 0.0 and 1.0 to avoid problems with broken

2000-12-11  Sven Neumann  <sven@gimp.org>

	* app/paint_core.c: clamp scale factor between 0.0 and 1.0 to avoid
	problems with broken XInput drivers. Should fix bug #18913.
parent d1fa3a55
2000-12-11 Sven Neumann <sven@gimp.org>
* app/paint_core.c: clamp scale factor between 0.0 and 1.0 to avoid
problems with broken XInput drivers. Should fix bug #18913.
2000-12-11 Sven Neumann <sven@gimp.org>
 
* configure.in
......
......@@ -1210,6 +1210,8 @@ paint_core_calculate_brush_size (MaskBuf *mask,
gint *width,
gint *height)
{
scale = CLAMP (scale, 0.0, 1.0);
if (current_device == GDK_CORE_POINTER)
{
*width = mask->width;
......@@ -1455,6 +1457,8 @@ paint_core_scale_mask (MaskBuf *brush_mask,
gint dest_width;
gint dest_height;
scale = CLAMP (scale, 0.0, 1.0);
if (scale == 0.0)
return NULL;
......@@ -1491,6 +1495,8 @@ paint_core_scale_pixmap (MaskBuf *brush_mask,
gint dest_width;
gint dest_height;
scale = CLAMP (scale, 0.0, 1.0);
if (scale == 0.0)
return NULL;
......
......@@ -1210,6 +1210,8 @@ paint_core_calculate_brush_size (MaskBuf *mask,
gint *width,
gint *height)
{
scale = CLAMP (scale, 0.0, 1.0);
if (current_device == GDK_CORE_POINTER)
{
*width = mask->width;
......@@ -1455,6 +1457,8 @@ paint_core_scale_mask (MaskBuf *brush_mask,
gint dest_width;
gint dest_height;
scale = CLAMP (scale, 0.0, 1.0);
if (scale == 0.0)
return NULL;
......@@ -1491,6 +1495,8 @@ paint_core_scale_pixmap (MaskBuf *brush_mask,
gint dest_width;
gint dest_height;
scale = CLAMP (scale, 0.0, 1.0);
if (scale == 0.0)
return NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment