diff options
| author | Manolo Gouy <Manolo> | 2017-06-11 06:12:20 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2017-06-11 06:12:20 +0000 |
| commit | ac4b59abf5cf8bd32dfcaf43d4fecc8cce902715 (patch) | |
| tree | 2058d927df350db57104a1d5c6f6e0c2a2734f14 | |
| parent | fe4f37519d94cfc21400be89e1c2fd77397f1ab4 (diff) | |
Scaling for WIN32 platform: avoid undrawn right and bottom window margins when manually resizing windows
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12258 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | src/Fl_win32.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 0491c6bb9..9a99a565a 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -43,6 +43,7 @@ #include <windows.h> #include <ole2.h> #include <shellapi.h> +#include <math.h> // for ceil() void fl_free_fonts(void); void fl_release_dc(HWND,HDC); @@ -1425,7 +1426,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar } else { Fl::handle(FL_SHOW, window); resize_bug_fix = window; - window->size(LOWORD(lParam)/scale, HIWORD(lParam)/scale); + window->size( ceil(LOWORD(lParam)/scale), ceil(HIWORD(lParam)/scale) ); //fprintf(LOG,"WM_SIZE parent size(%d,%d) s=%.2f\n",int(LOWORD(lParam)/scale),int(HIWORD(lParam)/scale),scale); } } |
