diff options
| author | Manolo Gouy <Manolo> | 2017-06-10 06:10:37 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2017-06-10 06:10:37 +0000 |
| commit | 8de22cfa4279bdf8e6edf36cf8e570e8e84d2eb3 (patch) | |
| tree | 38c748fa8fa2ce88cb4a2761a66d5bedc29fded2 /src | |
| parent | 6b2c5fcd0978422a3e58174658f68f0ad28782f8 (diff) | |
Scaling for X11 platform: avoid undrawn right and bottom window margins when manually resizing windows
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12255 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_x.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index 8f0f01651..d2dcc8e7e 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -44,6 +44,7 @@ # include <unistd.h> # include <time.h> # include <sys/time.h> +# include <math.h> # include <X11/Xmd.h> # include <X11/Xlocale.h> # include <X11/Xlib.h> @@ -2037,8 +2038,8 @@ fprintf(stderr,"\n");*/ resize_bug_fix = window; #if USE_XFT if (!Fl_X11_Window_Driver::data_for_resize_window_between_screens_.busy && - ( W != int(window->w()*s) || H != int(window->h()*s) ) ) { - window->resize(X/s, Y/s, W/s, H/s); + ( ceil(W/s) != window->w() || ceil(H/s) != window->h() ) ) { + window->resize(X/s, Y/s, ceil(W/s), ceil(H/s)); } else { window->position(X/s, Y/s); } |
