summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Gl_Window.cxx1
-rw-r--r--src/Fl_cocoa.mm9
2 files changed, 4 insertions, 6 deletions
diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx
index 33b0930cd..a7f6864bc 100644
--- a/src/Fl_Gl_Window.cxx
+++ b/src/Fl_Gl_Window.cxx
@@ -95,7 +95,6 @@ void Fl_Gl_Window::show() {
if (overlay && overlay != this) ((Fl_Gl_Window*)overlay)->show();
#elif defined(__APPLE__)
if( ! parent() ) need_redraw=1;
- else Fl_X::i(window())->contains_GL_subwindow();
#endif
}
Fl_Window::show();
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 2d1e45778..e1d556a1c 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -2006,6 +2006,10 @@ void Fl_X::make(Fl_Window* w)
Fl::e_number = old_event;
w->redraw(); // force draw to happen
}
+ if (w->as_gl_window()) { // if creating a sub-GL-window
+ while (win->window()) win = win->window();
+ [(FLWindow*)Fl_X::i(win)->xid setContainsGLsubwindow:YES];
+ }
fl_show_iconic = 0;
}
else { // create a desktop window
@@ -3362,11 +3366,6 @@ CGImageRef Fl_X::CGImage_from_window_rect(Fl_Window *win, int x, int y, int w, i
return img;
}
-void Fl_X::contains_GL_subwindow()
-{
- [(FLWindow*)xid setContainsGLsubwindow:YES];
-}
-
WindowRef Fl_X::window_ref()
{
return (WindowRef)[(FLWindow*)xid windowRef];