STR #1403: GLUT window creation code - better fix.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5376 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher
2006-08-29 07:36:51 +00:00
parent 345e0d7c8d
commit 3ae2d9cc7b
2 changed files with 7 additions and 26 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
CHANGES IN FLTK 1.1.8
- Fixed GLUT behavior on window creation (STR #1267)
- Fixed GLUT behavior on window creation (STR #1403)
- Fixed OS X bug that would hide tooltips before
they were shown (STR #1392)
- Fixed Fl_Tabs tooltip reappearing (STR #1324)
+6 -25
View File
@@ -42,7 +42,6 @@
#define MAXWINDOWS 32
static Fl_Glut_Window *windows[MAXWINDOWS+1];
static unsigned char reshaped[MAXWINDOWS+1];
Fl_Glut_Window *glut_window;
int glut_menu;
@@ -61,19 +60,8 @@ static int indraw;
void Fl_Glut_Window::draw() {
glut_window = this;
indraw = 1;
if (!reshaped[number] ) {
// ignore the first show event on glutCreateWindow
// avoid flickering:
glClear(GL_COLOR_BUFFER_BIT);
reshaped[number] = 1;
} else {
if( !valid() || reshaped[number] == 1 ) {
reshaped[number] = 2;
reshape(w(),h());
valid(1);
}
display();
}
if (!valid()) {reshape(w(),h()); valid(1);}
display();
indraw = 0;
}
@@ -83,17 +71,8 @@ void glutSwapBuffers() {
void Fl_Glut_Window::draw_overlay() {
glut_window = this;
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();
}
if (!valid()) {reshape(w(),h()); valid(1);}
overlaydisplay();
}
static void domenu(int, int, int);
@@ -260,6 +239,8 @@ int glutCreateWindow(const char *title) {
} else {
W->show();
}
W->valid(0);
W->context_valid(0);
W->make_current();
return W->number;
}