summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Gl_Overlay.cxx7
-rw-r--r--src/Fl_Gl_Window.cxx2
-rw-r--r--src/Fl_Gl_Window_Driver.H7
3 files changed, 6 insertions, 10 deletions
diff --git a/src/Fl_Gl_Overlay.cxx b/src/Fl_Gl_Overlay.cxx
index c10b6f068..ab969d447 100644
--- a/src/Fl_Gl_Overlay.cxx
+++ b/src/Fl_Gl_Overlay.cxx
@@ -224,18 +224,15 @@ void Fl_X11_Gl_Window_Driver::make_overlay(void *&current) {
////////////////////////////////////////////////////////////////
// Windows version:
-void Fl_WinAPI_Gl_Window_Driver::hide_overlay(void *& overlay) {
#if HAVE_GL_OVERLAY
+void Fl_WinAPI_Gl_Window_Driver::gl_hide_before(void *& overlay) {
if (overlay && overlay != pWindow) {
delete_gl_context((GLContext)overlay);
overlay = 0;
}
-#endif
}
+#endif
-void Fl_WinAPI_Gl_Window_Driver::hide_overlay() {
- Fl_Gl_Window_Driver::hide_overlay();
-}
void Fl_WinAPI_Gl_Window_Driver::make_overlay_current() {
#if HAVE_GL_OVERLAY
diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx
index 43e2f67ab..5677447ce 100644
--- a/src/Fl_Gl_Window.cxx
+++ b/src/Fl_Gl_Window.cxx
@@ -290,7 +290,7 @@ void Fl_Gl_Window::context(GLContext v, int destroy_flag) {
*/
void Fl_Gl_Window::hide() {
context(0);
- pGlWindowDriver->hide_overlay(overlay);
+ pGlWindowDriver->gl_hide_before(overlay);
Fl_Window::hide();
}
diff --git a/src/Fl_Gl_Window_Driver.H b/src/Fl_Gl_Window_Driver.H
index 9d28c1f22..56dbbcf69 100644
--- a/src/Fl_Gl_Window_Driver.H
+++ b/src/Fl_Gl_Window_Driver.H
@@ -62,7 +62,7 @@ public:
virtual void resize(int is_a_resize, int w, int h) {}
virtual char swap_type();
virtual int flush_begin(char& valid_f) {return 0;}
- virtual void hide_overlay(void *& overlay) {}
+ virtual void gl_hide_before(void *& overlay) {} // the default implementation may be enough
static Fl_Gl_Choice *find_begin(int m, const int *alistp);
// Return one of these structures for a given gl mode.
// The second argument is a glX attribute list, and is used if mode is zero.
@@ -72,7 +72,7 @@ public:
virtual void set_gl_context(Fl_Window* w, GLContext context) {}
virtual void delete_gl_context(GLContext) {}
virtual void make_overlay(void* &o);
- virtual void hide_overlay() {}
+ virtual void hide_overlay() {} // the default implementation may be enough
virtual void make_overlay_current() {}
virtual void redraw_overlay() {}
virtual int can_do_overlay() {return 0;}
@@ -135,8 +135,6 @@ class Fl_WinAPI_Gl_Window_Driver : public Fl_Gl_Window_Driver {
virtual void swap_buffers();
virtual void invalidate() {}
virtual int flush_begin(char& valid_f);
- virtual void hide_overlay(void *& overlay);
- virtual void hide_overlay();
virtual Fl_Gl_Choice *find(int m, const int *alistp);
virtual GLContext create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g, int layer = 0);
virtual void set_gl_context(Fl_Window* w, GLContext context);
@@ -149,6 +147,7 @@ class Fl_WinAPI_Gl_Window_Driver : public Fl_Gl_Window_Driver {
virtual void get_list(Fl_Font_Descriptor *fd, int r);
virtual int genlistsize();
#if HAVE_GL_OVERLAY
+ virtual void gl_hide_before(void *& overlay);
virtual int can_do_overlay();
virtual int overlay_color(Fl_Color i);
void make_overlay(void*&overlay);