diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_win32.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 0a9f7094a..555abd10e 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1252,6 +1252,20 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar // convert i->region in FLTK units to R2 in drawing units R2 = Fl_GDI_Graphics_Driver::scale_region(i->region, scale, NULL); + RECT r_box; + if (scale != 1 && GetRgnBox(R, &r_box) != NULLREGION) { + // add de-scaled update region to i->region in FLTK units + r_box.left /= scale; + r_box.right /= scale; + r_box.top /= scale; + r_box.bottom /= scale; + Fl_Region R3 = CreateRectRgn(r_box.left, r_box.top, r_box.right + 1, r_box.bottom + 1); + if (!i->region) i->region = R3; + else { + CombineRgn(i->region, i->region, R3, RGN_OR); + DeleteObject(R3); + } + } if (R2) { // Also tell Windows that we are drawing someplace else as well... CombineRgn(R2, R2, R, RGN_OR); |
