From a6878f94ef10e0f9f38711b6f1807b314effd2c6 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 22 Oct 2014 16:27:20 +0000 Subject: Fixed error in computation of when the window is not fully contained in the display. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10388 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/fl_read_image.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/fl_read_image.cxx b/src/fl_read_image.cxx index 2df98db70..f253c2aa8 100644 --- a/src/fl_read_image.cxx +++ b/src/fl_read_image.cxx @@ -137,7 +137,7 @@ fl_read_image(uchar *p, // I - Pixel buffer or NULL to allocate // screen dimensions Fl::screen_xywh(sx, sy, sw, sh, fl_screen); } - if (!win || (dx >= sx && dy >= sy && dx + w <= sw && dy + h <= sh)) { + if (!win || (dx >= sx && dy >= sy && dx + w <= sx+sw && dy + h <= sy+sh)) { // the image is fully contained, we can use the traditional method // however, if the window is obscured etc. the function will still fail. Make sure we // catch the error and continue, otherwise an exception will be thrown. -- cgit v1.2.3