Skip to content

Commit

Permalink
Potential fixes for double-buffered subwindows on WIN32 (STR #1)
Browse files Browse the repository at this point in the history
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2988 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
michaelrsweet committed May 20, 2003
1 parent 9a7fb54 commit c0e40ac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
4 changes: 3 additions & 1 deletion CHANGES
@@ -1,11 +1,13 @@
CHANGES IN FLTK 1.1.4

- Fixed handling of nested double-buffered windows (STR
#1)
- Showing a subwindow inside a hidden window would crash
the application (STR #23)
- OSX users couldn't enter some special chars when using
some foreign key layouts (STR #32)
- Hiding subwindows on OSX would hide the parent window
(STR #22)
(STR #22)
- Added thin plastic box types.
- Fl_Pack ignored the box() setting and cleared any
unused areas to the widget color; it now only does so
Expand Down
13 changes: 2 additions & 11 deletions src/Fl_Double_Window.cxx
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Double_Window.cxx,v 1.12.2.4.2.7 2003/01/30 21:41:40 easysw Exp $"
// "$Id: Fl_Double_Window.cxx,v 1.12.2.4.2.8 2003/05/20 19:09:32 easysw Exp $"
//
// Double-buffered window code for the Fast Light Tool Kit (FLTK).
//
Expand Down Expand Up @@ -187,15 +187,6 @@ extern void fl_restore_clip();
void Fl_Double_Window::flush() {flush(0);}

void Fl_Double_Window::flush(int eraseoverlay) {
#ifdef WIN32
// Windows seems to have trouble doing the double-buffer thing in sub-
// windows, so only create the backbuffer stuff for top-level windows.
if (parent()) {
Fl_Window::flush();
return;
}
#endif // WIN32

make_current(); // make sure fl_gc is non-zero
Fl_X *myi = Fl_X::i(this);
if (!myi->other_xid) {
Expand Down Expand Up @@ -308,5 +299,5 @@ Fl_Double_Window::~Fl_Double_Window() {
}

//
// End of "$Id: Fl_Double_Window.cxx,v 1.12.2.4.2.7 2003/01/30 21:41:40 easysw Exp $".
// End of "$Id: Fl_Double_Window.cxx,v 1.12.2.4.2.8 2003/05/20 19:09:32 easysw Exp $".
//
7 changes: 4 additions & 3 deletions src/Fl_win32.cxx
@@ -1,5 +1,5 @@
//
// "$Id: Fl_win32.cxx,v 1.33.2.37.2.44 2003/01/30 21:43:11 easysw Exp $"
// "$Id: Fl_win32.cxx,v 1.33.2.37.2.45 2003/05/20 19:09:33 easysw Exp $"
//
// WIN32-specific code for the Fast Light Tool Kit (FLTK).
//
Expand Down Expand Up @@ -613,7 +613,8 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
fl_save_pen();
i->flush();
fl_restore_pen();
ValidateRgn(hWnd,i->region);
if (window->parent()) ValidateRgn(hWnd,0);
else ValidateRgn(hWnd,i->region);
window->clear_damage();
} return 0;

Expand Down Expand Up @@ -1192,5 +1193,5 @@ void Fl_Window::make_current() {
}

//
// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.44 2003/01/30 21:43:11 easysw Exp $".
// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.45 2003/05/20 19:09:33 easysw Exp $".
//

0 comments on commit c0e40ac

Please sign in to comment.