From 04ec829bfba341038150beab718c2d090efdb42b Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Fri, 1 Nov 2019 08:26:22 +0100 Subject: Fix fl_overlay_rect() under X11 on HighDPI display. The mandelbrot demo program is fixed. --- src/Fl_Graphics_Driver.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx index b6781914e..e95d3754b 100644 --- a/src/Fl_Graphics_Driver.cxx +++ b/src/Fl_Graphics_Driver.cxx @@ -204,7 +204,9 @@ unsigned Fl_Graphics_Driver::font_desc_size() { scale() and in slightly modifying that to help support tiled images. */ void Fl_Graphics_Driver::cache_size(Fl_Image *img, int &width, int &height) { - if ( int(scale()) == scale() ) { + if ( int(scale()) == scale() + || width==1 || height==1 // to cover fl_overlay_clear + ) { width = width * scale(); height = height * scale(); } else { -- cgit v1.2.3