summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-11-01 08:26:22 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-11-01 08:26:22 +0100
commit04ec829bfba341038150beab718c2d090efdb42b (patch)
tree3d9241064a58fee07797bfb4071128c41bb3ebfc
parent034d49064e54990823aa6a55383fe87d381e736c (diff)
Fix fl_overlay_rect() under X11 on HighDPI display.
The mandelbrot demo program is fixed.
-rw-r--r--src/Fl_Graphics_Driver.cxx4
1 files changed, 3 insertions, 1 deletions
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 {