summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--src/glut_compatability.cxx31
2 files changed, 7 insertions, 26 deletions
diff --git a/CHANGES b/CHANGES
index 5a5182769..156071721 100644
--- a/CHANGES
+++ b/CHANGES
@@ -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)
diff --git a/src/glut_compatability.cxx b/src/glut_compatability.cxx
index 373beb438..25997eaa8 100644
--- a/src/glut_compatability.cxx
+++ b/src/glut_compatability.cxx
@@ -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;
}