Calling deactivate() from a non-displayed widget could cause an infinite

loop.  I didn't really fix this, but I removed deactivate() from constructors
and replaced with set_flag(INACTIVE).  The loop would happen if a widget
responded to FL_MOVE by calling draw_overlay or otherwise creating an
overlay, which is a pretty rare event.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@792 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Bill Spitzak 1999-10-23 05:59:27 +00:00
parent 06ea565dba
commit ecd524fdc7
3 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.1 1999/09/16 05:34:25 bill Exp $"
// "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.2 1999/10/23 05:59:26 bill Exp $"
//
// OpenGL overlay code for the Fast Light Tool Kit (FLTK).
//
@ -70,7 +70,7 @@ public:
overlay_choice.d = 0;
overlay_choice.o = 1;
g = &overlay_choice;
deactivate();
set_flag(INACTIVE);
}
};
@ -195,5 +195,5 @@ void Fl_Gl_Window::hide_overlay() {
#endif
//
// End of "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.1 1999/09/16 05:34:25 bill Exp $".
// End of "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.2 1999/10/23 05:59:26 bill Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Overlay_Window.cxx,v 1.7 1999/01/07 19:17:24 mike Exp $"
// "$Id: Fl_Overlay_Window.cxx,v 1.7.2.1 1999/10/23 05:59:27 bill Exp $"
//
// Overlay window code for the Fast Light Tool Kit (FLTK).
//
@ -84,7 +84,7 @@ class _Fl_Overlay : public Fl_Window {
void show();
public:
_Fl_Overlay(int x, int y, int w, int h) :
Fl_Window(x,y,w,h) {deactivate();}
Fl_Window(x,y,w,h) {set_flag(INACTIVE);}
};
int Fl_Overlay_Window::can_do_overlay() {
@ -140,5 +140,5 @@ void Fl_Overlay_Window::redraw_overlay() {
#endif
//
// End of "$Id: Fl_Overlay_Window.cxx,v 1.7 1999/01/07 19:17:24 mike Exp $".
// End of "$Id: Fl_Overlay_Window.cxx,v 1.7.2.1 1999/10/23 05:59:27 bill Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: forms_free.cxx,v 1.4 1999/01/07 19:17:44 mike Exp $"
// "$Id: forms_free.cxx,v 1.4.2.1 1999/10/23 05:59:27 bill Exp $"
//
// Forms free widget routines for the Fast Light Tool Kit (FLTK).
//
@ -42,7 +42,7 @@ Fl_Free::Fl_Free(uchar t,int x,int y,int w,int h,const char *l,
Fl_Widget(x,y,w,h,l) {
type(t);
hfunc = hdl;
if (t == FL_SLEEPING_FREE) deactivate();
if (t == FL_SLEEPING_FREE) set_flag(INACTIVE);
if (t == FL_CONTINUOUS_FREE || t == FL_ALL_FREE)
Fl::add_timeout(.01,step,this);
}
@ -73,5 +73,5 @@ int Fl_Free::handle(int e) {
}
//
// End of "$Id: forms_free.cxx,v 1.4 1999/01/07 19:17:44 mike Exp $".
// End of "$Id: forms_free.cxx,v 1.4.2.1 1999/10/23 05:59:27 bill Exp $".
//