Fixed GLUT behavior on window creation (STR #1267)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5363 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2006-08-25 09:11:42 +00:00
parent 4fae32c85c
commit 961391ac08
2 changed files with 24 additions and 4 deletions

View File

@ -1,5 +1,6 @@
CHANGES IN FLTK 1.1.8
- Fixed GLUT behavior on window creation (STR #1267)
- Fixed OS X bug that would hide tooltips before
they were shown (STR #1392)
- Fixed Fl_Tabs tooltip reappearing (STR #1324)

View File

@ -42,6 +42,7 @@
#define MAXWINDOWS 32
static Fl_Glut_Window *windows[MAXWINDOWS+1];
static unsigned char reshaped[MAXWINDOWS+1];
Fl_Glut_Window *glut_window;
int glut_menu;
@ -60,8 +61,17 @@ static int indraw;
void Fl_Glut_Window::draw() {
glut_window = this;
indraw = 1;
if (!valid()) {reshape(w(),h()); valid(1);}
display();
if (!reshaped[number] ) {
// ignore the first show event on glutCreateWindow
reshaped[number] = 1;
} else {
if( !valid() || reshaped[number] == 1 ) {
reshaped[number] = 2;
reshape(w(),h());
valid(1);
}
display();
}
indraw = 0;
}
@ -71,8 +81,17 @@ void glutSwapBuffers() {
void Fl_Glut_Window::draw_overlay() {
glut_window = this;
if (!valid()) {reshape(w(),h()); valid(1);}
overlaydisplay();
if (!reshaped[number] ) {
// ignore the first show event on glutCreateWindow
reshaped[number] = 1;
} else {
if( !valid() || reshaped[number] == 1 ) {
reshaped[number] = 2;
reshape(w(),h());
valid(1);
}
overlaydisplay();
}
}
static void domenu(int, int, int);