Skip to content

Commit

Permalink
Fl_Gl_Window leaked memory for damage regions
Browse files Browse the repository at this point in the history
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1391 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
spitzak committed Feb 26, 2001
1 parent 3af1119 commit 8470c05
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/Fl.cxx
@@ -1,5 +1,5 @@
//
// "$Id: Fl.cxx,v 1.24.2.40 2001/01/26 13:31:51 easysw Exp $"
// "$Id: Fl.cxx,v 1.24.2.41 2001/02/26 00:19:02 spitzak Exp $"
//
// Main event handling code for the Fast Light Tool Kit (FLTK).
//
Expand Down Expand Up @@ -330,15 +330,12 @@ void Fl::flush() {
if (damage()) {
damage_ = 0;
for (Fl_X* x = Fl_X::first; x; x = x->next) {
if (x->w->damage() && x->w->visible_r()) {
if (x->wait_for_expose) {
// leave Fl::damage() set so programs can tell damage still exists
damage_ = 1;
} else {
x->flush();
x->w->clear_damage();
}
}
if (x->wait_for_expose) {damage_ = 1; continue;}
Fl_Window* w = x->w;
if (!w->visible_r()) continue;
if (w->damage()) {x->flush(); w->clear_damage();}
// destroy damage regions for windows that don't use them:
if (x->region) {XDestroyRegion(x->region); x->region = 0;}
}
}
#ifdef WIN32
Expand Down Expand Up @@ -783,5 +780,5 @@ void Fl_Window::flush() {
}

//
// End of "$Id: Fl.cxx,v 1.24.2.40 2001/01/26 13:31:51 easysw Exp $".
// End of "$Id: Fl.cxx,v 1.24.2.41 2001/02/26 00:19:02 spitzak Exp $".
//

0 comments on commit 8470c05

Please sign in to comment.