Author: manolo
Date: 2011-05-12 04:50:43 -0700 (Thu, 12 May 2011)
New Revision: 8657
Log:
Mac OS: simplified by removing Fl_X::contains_GL_subwindow() function. 
This operation is now performed within Fl_cocoa.mm

Modified:
   branches/branch-1.3/FL/mac.H
   branches/branch-1.3/src/Fl_Gl_Window.cxx
   branches/branch-1.3/src/Fl_cocoa.mm

Modified: branches/branch-1.3/FL/mac.H
===================================================================
--- branches/branch-1.3/FL/mac.H        2011-05-12 08:07:27 UTC (rev 8656)
+++ branches/branch-1.3/FL/mac.H        2011-05-12 11:50:43 UTC (rev 8657)
@@ -140,7 +140,6 @@
   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);

Modified: branches/branch-1.3/src/Fl_Gl_Window.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Gl_Window.cxx    2011-05-12 08:07:27 UTC (rev 
8656)
+++ branches/branch-1.3/src/Fl_Gl_Window.cxx    2011-05-12 11:50:43 UTC (rev 
8657)
@@ -95,7 +95,6 @@
     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();

Modified: branches/branch-1.3/src/Fl_cocoa.mm
===================================================================
--- branches/branch-1.3/src/Fl_cocoa.mm 2011-05-12 08:07:27 UTC (rev 8656)
+++ branches/branch-1.3/src/Fl_cocoa.mm 2011-05-12 11:50:43 UTC (rev 8657)
@@ -2006,6 +2006,10 @@
       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 @@
   return img;
 }
 
-void Fl_X::contains_GL_subwindow() 
-{
-  [(FLWindow*)xid setContainsGLsubwindow:YES];
-}
-
 WindowRef Fl_X::window_ref()
 {
   return (WindowRef)[(FLWindow*)xid windowRef];

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to