diff options
| author | Manolo Gouy <Manolo> | 2011-05-12 11:50:43 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-05-12 11:50:43 +0000 |
| commit | bcdf4a4be16cd73a15643c67934d5a28f66a0a55 (patch) | |
| tree | 08aee92b57ccb28fa426748fff53f75d76b535fd | |
| parent | 622b357f24ed98769e7006225690bfdbb6648e83 (diff) | |
Mac OS: simplified by removing Fl_X::contains_GL_subwindow() function.
This operation is now performed within Fl_cocoa.mm
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8657 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | FL/mac.H | 1 | ||||
| -rw-r--r-- | src/Fl_Gl_Window.cxx | 1 | ||||
| -rw-r--r-- | src/Fl_cocoa.mm | 9 |
3 files changed, 4 insertions, 7 deletions
@@ -140,7 +140,6 @@ public: int unlink(Fl_X* start = NULL); void collapse(void); WindowRef window_ref(void); - void contains_GL_subwindow(void); void set_key_window(void); void set_cursor(Fl_Cursor); static CGImageRef CGImage_from_window_rect(Fl_Window *win, int x, int y, int w, int h); 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]; |
