Revert WIN32 redraw fix from r4244, and apply a new one that is a bit
cleaner which should not cause problems. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4360 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
067d8d2d16
commit
461d60a0f3
1
CHANGES
1
CHANGES
@ -2,6 +2,7 @@ CHANGES IN FLTK 1.1.7
|
||||
|
||||
- Documentation fixes (STR #648, STR #692, STR #730, STR
|
||||
#744, STR #745)
|
||||
- Fixed some redraw issues on Windows XP.
|
||||
- FLUID didn't set the initial size of widgets properly
|
||||
(STR #850)
|
||||
- Fl_Tabs would steal focus away from its children on a
|
||||
|
@ -589,27 +589,27 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
|
||||
break;
|
||||
|
||||
case WM_PAINT: {
|
||||
Fl_Region R, sysR = CreateRectRgn(0,0,0,0);
|
||||
GetUpdateRgn(hWnd,sysR,0);
|
||||
Fl_Region R;
|
||||
Fl_X *i = Fl_X::i(window);
|
||||
i->wait_for_expose = 0;
|
||||
if (!i->region && window->damage()) {
|
||||
// Redraw the whole window...
|
||||
i->region = CreateRectRgn(0, 0, window->w(), window->h());
|
||||
} else {
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
||||
// 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((uchar)(window->damage()|FL_DAMAGE_EXPOSE));
|
||||
// These next two statements should not be here, so that all update
|
||||
// is deferred until Fl::flush() is called during idle. However WIN32
|
||||
@ -620,7 +620,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
|
||||
i->flush();
|
||||
fl_restore_pen();
|
||||
if (window->type() == FL_DOUBLE_WINDOW) ValidateRgn(hWnd,0);
|
||||
else ValidateRgn(hWnd,sysR);
|
||||
else ValidateRgn(hWnd,i->region);
|
||||
window->clear_damage();
|
||||
} return 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user