diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-11-25 09:21:27 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-11-25 09:21:44 +0100 |
| commit | d7985607d6dd8308f104d84c778080731fa23c9a (patch) | |
| tree | ca5fec95303f861e782d0ae7f5a0b12d72fdf2e0 /src/drivers | |
| parent | c70a091fa3bfbaa4e28d456a3dac7214217aa206 (diff) | |
Fix for issue #123 - X11 platform
As discussed, only the window position becomes rounded to nearest integer value
when a fractional GUI scale factor is applied.
Diffstat (limited to 'src/drivers')
| -rw-r--r-- | src/drivers/X11/Fl_X11_Screen_Driver.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/drivers/X11/Fl_X11_Screen_Driver.cxx b/src/drivers/X11/Fl_X11_Screen_Driver.cxx index 914104769..90a838126 100644 --- a/src/drivers/X11/Fl_X11_Screen_Driver.cxx +++ b/src/drivers/X11/Fl_X11_Screen_Driver.cxx @@ -793,8 +793,11 @@ Fl_RGB_Image *Fl_X11_Screen_Driver::read_win_rectangle(int X, int Y, int w, int XTranslateCoordinates(fl_display, xid, RootWindow(fl_display, fl_screen), Xs, Ys, &dx, &dy, &child_win); // screen dimensions - Fl::screen_xywh(sx, sy, sw, sh, Fl_Window_Driver::driver(win)->screen_num()); - sx *= s; sy *= s; sw *= s; sh *= s; + int ns = Fl_Window_Driver::driver(win)->screen_num(); + sx = screens[ns].x_org; + sy = screens[ns].y_org; + sw = screens[ns].width; + sh = screens[ns].height; } if (win && !allow_outside && int(s) != s) { ws = (w+1) * s; // matches what Fl_Graphics_Driver::cache_size() does |
