summaryrefslogtreecommitdiff
path: root/src/drivers/X11
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-11-02 11:41:42 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-11-02 11:41:42 +0100
commitda29db9f9c3b789cd31921cb30a1418392d4214f (patch)
treeeb6feb2da36bd916093394655774962bfb5601df /src/drivers/X11
parentecdb386f3da9d70c45c601d3456c2e32d95a3863 (diff)
Slightly simpler code to support fl_overlay_rect() on HighDPI screens.
Diffstat (limited to 'src/drivers/X11')
-rw-r--r--src/drivers/X11/Fl_X11_Screen_Driver.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/drivers/X11/Fl_X11_Screen_Driver.cxx b/src/drivers/X11/Fl_X11_Screen_Driver.cxx
index b8056ff0d..0e1864291 100644
--- a/src/drivers/X11/Fl_X11_Screen_Driver.cxx
+++ b/src/drivers/X11/Fl_X11_Screen_Driver.cxx
@@ -796,6 +796,8 @@ Fl_RGB_Image *Fl_X11_Screen_Driver::read_win_rectangle(int X, int Y, int w, int
sx *= s; sy *= s; sw *= s; sh *= s;
}
if (win && !allow_outside && int(s) != s) {
+ ws = (w+1) * s; // matches what Fl_Graphics_Driver::cache_size() does
+ hs = (h+1) * s;
if (Xs + ws >= int(win->w()*s)) ws = win->w()*s - Xs -1;
if (Ys + hs >= int(win->h()*s)) hs = win->h()*s - Ys -1;
}