diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-10-29 20:18:55 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-10-29 20:18:55 +0000 |
| commit | 0daa36de390e6a67545f920f829be6097beef102 (patch) | |
| tree | 9ebed44208ad067ee6ee2f68352cc67c449e5387 | |
| parent | 263f2ed1e6ef29556d69d57f0c2f9a206478fc45 (diff) | |
More fun with WIN32 redraw...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2710 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | src/Fl_win32.cxx | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index e6279f04f..59d158077 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_win32.cxx,v 1.33.2.37.2.40 2002/10/28 15:15:24 easysw Exp $" +// "$Id: Fl_win32.cxx,v 1.33.2.37.2.41 2002/10/29 20:18:55 easysw Exp $" // // WIN32-specific code for the Fast Light Tool Kit (FLTK). // @@ -587,16 +587,22 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar Fl_Region R; Fl_X *i = Fl_X::i(window); i->wait_for_expose = 0; - // We need to merge WIN32's damage into FLTK's damage. - R = CreateRectRgn(0,0,0,0); - GetUpdateRgn(hWnd,R,0); - 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); + if (!i->region && window->damage()) { + // Redraw the whole window... + i->region = CreateRectRgn(0, 0, window->w(), window->h()); } else { - i->region = R; + // We need to merge WIN32's damage into FLTK's damage. + R = CreateRectRgn(0,0,0,0); + GetUpdateRgn(hWnd,R,0); + + 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; + } } window->clear_damage(window->damage()|FL_DAMAGE_EXPOSE); // These next two statements should not be here, so that all update @@ -1186,5 +1192,5 @@ void Fl_Window::make_current() { } // -// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.40 2002/10/28 15:15:24 easysw Exp $". +// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.41 2002/10/29 20:18:55 easysw Exp $". // |
