summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2014-10-22 16:27:20 +0000
committerManolo Gouy <Manolo>2014-10-22 16:27:20 +0000
commita6878f94ef10e0f9f38711b6f1807b314effd2c6 (patch)
treed899acf28391e45c816f21db105e1bd177b72a96 /src
parent8592cddcfdd57c21014e1146239776ed78fd9fb4 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/fl_read_image.cxx2
1 files changed, 1 insertions, 1 deletions
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.