summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES1
-rw-r--r--src/Fl_win32.cxx7
2 files changed, 7 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 1bad6e85c..80caa8a2c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@ CHANGES IN FLTK 1.1.7
- Documentation fixes (STR #648, STR #692, STR #730, STR
#744, STR #745, STR #942)
+ - WIN32: Internal WM_PAINT message now ignored (STR #831)
- Added Windows support for Fl_Window::xclass() (STR #848)
- Floating point input field allows characters from
current locale (STR #903)
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index 723f76297..c135d3256 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -601,14 +601,19 @@ 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;
+ char redraw_whole_window = false;
if (!i->region && window->damage()) {
// Redraw the whole window...
i->region = CreateRectRgn(0, 0, window->w(), window->h());
+ redraw_whole_window = true;
}
// We need to merge WIN32's damage into FLTK's damage.
R = CreateRectRgn(0,0,0,0);
- GetUpdateRgn(hWnd,R,0);
+ int r = GetUpdateRgn(hWnd,R,0);
+ if (r==NULLREGION && !redraw_whole_window) {
+ break;
+ }
if (i->region) {
// Also tell WIN32 that we are drawing someplace else as well...