summaryrefslogtreecommitdiff
path: root/src/drivers/X11/Fl_X11_Screen_Driver.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-04-25 15:12:34 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-04-25 15:12:34 +0200
commitc0d2aa3f09ab0f68265d1aee28b9121bfadc945e (patch)
tree469e27814b70138cc4c60bb8f07c7968010065f1 /src/drivers/X11/Fl_X11_Screen_Driver.cxx
parent6d21285e0f7462cc1d98c92242cd4a917b765b5a (diff)
Fix problem in window titlebar capture under X11.
Diffstat (limited to 'src/drivers/X11/Fl_X11_Screen_Driver.cxx')
-rw-r--r--src/drivers/X11/Fl_X11_Screen_Driver.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/X11/Fl_X11_Screen_Driver.cxx b/src/drivers/X11/Fl_X11_Screen_Driver.cxx
index 8dc79fc68..270504fd7 100644
--- a/src/drivers/X11/Fl_X11_Screen_Driver.cxx
+++ b/src/drivers/X11/Fl_X11_Screen_Driver.cxx
@@ -703,8 +703,8 @@ Fl_RGB_Image *Fl_X11_Screen_Driver::read_win_rectangle(int X, int Y, int w, int
hs = (h+1) * s;
}
#endif
- if (win && Xs + ws >= int(win->w()*s)) ws = win->w()*s - Xs -1;
- if (win && Ys + hs >= int(win->h()*s)) hs = win->h()*s - Ys -1;
+ if (!allow_outside && win && Xs + ws >= int(win->w()*s)) ws = win->w()*s - Xs -1;
+ if (!allow_outside && win && Ys + hs >= int(win->h()*s)) hs = win->h()*s - Ys -1;
if (ws < 1) ws = 1;
if (hs < 1) hs = 1;
if (!win || (dx >= sx && dy >= sy && dx + ws <= sx+sw && dy + hs <= sy+sh) ) {