diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-11-01 08:26:22 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-11-01 08:26:22 +0100 |
| commit | 04ec829bfba341038150beab718c2d090efdb42b (patch) | |
| tree | 3d9241064a58fee07797bfb4071128c41bb3ebfc /src | |
| parent | 034d49064e54990823aa6a55383fe87d381e736c (diff) | |
Fix fl_overlay_rect() under X11 on HighDPI display.
The mandelbrot demo program is fixed.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Graphics_Driver.cxx | 4 |
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 { |
