From da29db9f9c3b789cd31921cb30a1418392d4214f Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Sat, 2 Nov 2019 11:41:42 +0100 Subject: Slightly simpler code to support fl_overlay_rect() on HighDPI screens. --- src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx') diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx index edbfba577..f87ae8df3 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx @@ -495,8 +495,8 @@ Fl_WinAPI_Screen_Driver::read_win_rectangle( int ws, hs; if (int(s) == s) { ws = w * s; hs = h * s;} else { - ws = (w+1)*s-1; - hs = (h+1)*s-1; + ws = (w+1)*s; // matches what Fl_Graphics_Driver::cache_size() does + hs = (h+1)*s; if (ws < 1) ws = 1; if (hs < 1) hs = 1; } -- cgit v1.2.3