summaryrefslogtreecommitdiff
path: root/src/Fl_Gl_Window.cxx
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>2000-06-03 08:37:09 +0000
committerBill Spitzak <spitzak@gmail.com>2000-06-03 08:37:09 +0000
commitb0cdb25d3cf5e3016ce14d889a357cd963ba876d (patch)
tree9add6102de13b9ba92d548d19d8b2e2ae0387b9e /src/Fl_Gl_Window.cxx
parentfa364dc13e591c9a0362a297e0369575bd4bb718 (diff)
Fixes for 1.0.8 I found:
Fixed hardware overlays. The problem was the new fl_clipped() code, which tests against the current window size. The hardware overlay code did not set the current window when drawing the overlay. I needed hardware overlay for DD's code, I'm not sure if these fixes are good enough to enable this in our general release. Hardware overlay still only works on SGI Irix. Some patches to turn off the MSVC++ -Oa (assumme no aliasing) optimization flag. Suprisingly this only broke a few parts of fltk, or at least these are the only ones I found. Does not unmap child windows when the main window is iconized. This reduces flashing when the window is deiconized. Fl::key() is set to zero by all events except key down/up. This will allow you to reliably test if an event or callback was produced by a keystroke. Fixes the bug posted about stopping Escape from closing the window. User defined cursors on OpenGL windows slowed down NT a *LOT*. Some attempts to fix this by turning off the cursor while drawing the window. Filename completion in the file chooser works better on NT. Typing TAB fixes the case of everything you typed to match the shortest name that can be completed. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1158 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Gl_Window.cxx')
-rw-r--r--src/Fl_Gl_Window.cxx23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx
index f8d695884..16073c9dc 100644
--- a/src/Fl_Gl_Window.cxx
+++ b/src/Fl_Gl_Window.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Gl_Window.cxx,v 1.12.2.11 2000/04/25 22:16:24 mike Exp $"
+// "$Id: Fl_Gl_Window.cxx,v 1.12.2.12 2000/06/03 08:37:01 bill Exp $"
//
// OpenGL window code for the Fast Light Tool Kit (FLTK).
//
@@ -126,6 +126,7 @@ void Fl_Gl_Window::make_current() {
}
#endif // USE_COLORMAP
glDrawBuffer(GL_BACK);
+ current_ = this;
}
void Fl_Gl_Window::ortho() {
@@ -158,15 +159,17 @@ int fl_overlay_depth = 0;
void Fl_Gl_Window::flush() {
uchar save_valid = valid_;
+#ifdef _WIN32
+ // SGI 320 messes up overlay with user-defined cursors:
+ bool fixcursor =
+ Fl_X::i(this)->cursor && Fl_X::i(this)->cursor != fl_default_cursor;
+ if (fixcursor) SetCursor(0);
+#endif
#if HAVE_GL_OVERLAY && defined(_WIN32)
- bool fixcursor = false;
if (overlay && overlay != this &&
- ((damage()&(FL_DAMAGE_OVERLAY|FL_DAMAGE_ALL|FL_DAMAGE_EXPOSE))
+ ((damage()&(FL_DAMAGE_OVERLAY|FL_DAMAGE_EXPOSE))
|| !save_valid)) {
- // SGI 320 messes up overlay over singlebuffer
- fixcursor = !g->d;
- if (fixcursor) SetCursor(0);
// Draw into hardware overlay planes
fl_set_gl_context(this, (GLXContext)overlay);
if (fl_overlay_depth)
@@ -262,11 +265,11 @@ void Fl_Gl_Window::flush() {
draw();
if (overlay == this) draw_overlay();
glFlush();
-#if HAVE_GL_OVERLAY && defined(_WIN32)
- if (fixcursor) SetCursor(Fl_X::i(this)->cursor);
-#endif
}
+#ifdef _WIN32
+ if (fixcursor) SetCursor(Fl_X::i(this)->cursor);
+#endif
valid(1);
}
@@ -320,5 +323,5 @@ void Fl_Gl_Window::draw_overlay() {}
#endif
//
-// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.11 2000/04/25 22:16:24 mike Exp $".
+// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.12 2000/06/03 08:37:01 bill Exp $".
//