diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2007-05-16 12:47:49 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2007-05-16 12:47:49 +0000 |
| commit | 04ced5396e67c19ea808b64c851f8fa039e8eb95 (patch) | |
| tree | 3465783b4a888ca4d08401c6948a5488e0927b40 | |
| parent | 849efb47ae1ba1d3169044a6a949b4c73b770f55 (diff) | |
STR #1681: On WIN32 WM_PAINT messages, FLTK would first render the damaged area and then set the area as valid again. While this is mostly fine on single CPU machines, multi-CPU machines may re-invalidate areas that are currently drawn, resulting in unrendered strips when another window was moved quickly across an FLTK window during its redraw phase.
The new implementation validates the damaged area as quickly as possible, allowing new damage requests to be handled correctly, even while we are still redrawing the same damaged area.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5836 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | CHANGES | 1 | ||||
| -rw-r--r-- | src/Fl_win32.cxx | 5 |
2 files changed, 3 insertions, 3 deletions
@@ -3,6 +3,7 @@ CHANGES IN FLTK 1.1.8 - Documentation fixes (STR #1454, STR #1455, STR #1456, STR #1457, STR #1458, STR #1460, STR #1481, STR #1578, STR #1639, STR #1645, STR #1644) + - Fixed occasional incomplete refresh (STR #1681) - Improved fl_down, fl_frame, added fl_box (STR #1678) - Fixed selection of submenu items in input_choice (STR #1676) diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 94686a195..607b8b750 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -723,12 +723,13 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar if (i->region) { // Also tell WIN32 that we are drawing someplace else as well... - InvalidateRgn(hWnd, i->region, FALSE); CombineRgn(i->region, i->region, R, RGN_OR); XDestroyRegion(R); } else { i->region = R; } + if (window->type() == FL_DOUBLE_WINDOW) ValidateRgn(hWnd,0); + else ValidateRgn(hWnd,i->region); window->clear_damage((uchar)(window->damage()|FL_DAMAGE_EXPOSE)); // These next two statements should not be here, so that all update @@ -739,8 +740,6 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar fl_save_pen(); i->flush(); fl_restore_pen(); - if (window->type() == FL_DOUBLE_WINDOW) ValidateRgn(hWnd,0); - else ValidateRgn(hWnd,i->region); window->clear_damage(); } return 0; |
