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
This commit is contained in:
Manolo Gouy 2014-10-22 16:27:20 +00:00
parent 8592cddcfd
commit a6878f94ef

View File

@ -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.