Fix changing of schemes - otherwise Fl_Window::show() could cause a

reference to a non-existing tiled image.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1908 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2002-01-03 18:28:37 +00:00
parent 81be28e2dd
commit 8fe611b5cd
4 changed files with 29 additions and 6 deletions

View File

@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.0b9
- Fl::scheme() didn't update windows that were not
shown.
- The fractals demo would get far ahead of the UI with
some Linux OpenGL drivers. Now use glFinish() instead
of glFlush() so we are at most 1 frame ahead.

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_mac.cxx,v 1.1.2.12 2002/01/03 08:08:21 matthiaswm Exp $"
// "$Id: Fl_mac.cxx,v 1.1.2.13 2002/01/03 18:28:36 easysw Exp $"
//
// MacOS specific code for the Fast Light Tool Kit (FLTK).
//
@ -1008,6 +1008,13 @@ void Fl_Window::label(const char *name,const char */*iname*/) {
* make a window visible
*/
void Fl_Window::show() {
image(Fl::scheme_bg_);
if (Fl::scheme_bg_) {
labeltype(FL_NORMAL_LABEL);
align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_CLIP);
} else {
labeltype(FL_NO_LABEL);
}
if (!shown() || !i) {
Fl_X::make(this);
} else {
@ -1089,6 +1096,6 @@ void Fl_Window::make_current()
}
//
// End of "$Id: Fl_mac.cxx,v 1.1.2.12 2002/01/03 08:08:21 matthiaswm Exp $".
// End of "$Id: Fl_mac.cxx,v 1.1.2.13 2002/01/03 18:28:36 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_win32.cxx,v 1.33.2.37.2.12 2002/01/01 15:11:31 easysw Exp $"
// "$Id: Fl_win32.cxx,v 1.33.2.37.2.13 2002/01/03 18:28:36 easysw Exp $"
//
// WIN32-specific code for the Fast Light Tool Kit (FLTK).
//
@ -978,6 +978,13 @@ void Fl_Window::label(const char *name,const char *iname) {
//static inline int can_boxcheat(uchar b) {return (b==1 || (b&2) && b<=15);}
void Fl_Window::show() {
image(Fl::scheme_bg_);
if (Fl::scheme_bg_) {
labeltype(FL_NORMAL_LABEL);
align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_CLIP);
} else {
labeltype(FL_NO_LABEL);
}
if (!shown()) {
// if (can_boxcheat(box())) fl_background_pixel = fl_xpixel(color());
Fl_X::make(this);
@ -1028,5 +1035,5 @@ void Fl_Window::make_current() {
}
//
// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.12 2002/01/01 15:11:31 easysw Exp $".
// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.13 2002/01/03 18:28:36 easysw Exp $".
//

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_x.cxx,v 1.24.2.24.2.9 2002/01/01 15:11:31 easysw Exp $"
// "$Id: Fl_x.cxx,v 1.24.2.24.2.10 2002/01/03 18:28:37 easysw Exp $"
//
// X specific code for the Fast Light Tool Kit (FLTK).
//
@ -921,6 +921,13 @@ void Fl_Window::label(const char *name,const char *iname) {
static inline int can_boxcheat(uchar b) {return (b==1 || (b&2) && b<=15);}
void Fl_Window::show() {
image(Fl::scheme_bg_);
if (Fl::scheme_bg_) {
labeltype(FL_NORMAL_LABEL);
align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_CLIP);
} else {
labeltype(FL_NO_LABEL);
}
if (!shown()) {
fl_open_display();
if (can_boxcheat(box())) fl_background_pixel = int(fl_xpixel(color()));
@ -947,5 +954,5 @@ void Fl_Window::make_current() {
#endif
//
// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.9 2002/01/01 15:11:31 easysw Exp $".
// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.10 2002/01/03 18:28:37 easysw Exp $".
//