mirror of
https://github.com/fltk/fltk.git
synced 2026-06-08 01:46:00 +08:00
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:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user