mirror of
https://github.com/fltk/fltk.git
synced 2026-06-04 15:32:12 +08:00
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
This commit is contained in:
+2
-1
@@ -43,6 +43,7 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <ole2.h>
|
#include <ole2.h>
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
|
#include <math.h> // for ceil()
|
||||||
|
|
||||||
void fl_free_fonts(void);
|
void fl_free_fonts(void);
|
||||||
void fl_release_dc(HWND,HDC);
|
void fl_release_dc(HWND,HDC);
|
||||||
@@ -1425,7 +1426,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
|
|||||||
} else {
|
} else {
|
||||||
Fl::handle(FL_SHOW, window);
|
Fl::handle(FL_SHOW, window);
|
||||||
resize_bug_fix = 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);
|
//fprintf(LOG,"WM_SIZE parent size(%d,%d) s=%.2f\n",int(LOWORD(lParam)/scale),int(HIWORD(lParam)/scale),scale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user