> > Adopted use of FL_LIBRARY #define symbol under Mac OS X. This allows to 
> > compile
> > client applications without including Mac OS system headers, ...
>
> Fine, changes look good, but there's one small thing I don't understand.
> Maybe some testing relic ?
>
> You change in src/Fl.cxx:
>
> > Modified: branches/branch-1.3/src/Fl.cxx
> > ===================================================================
> > --- branches/branch-1.3/src/Fl.cxx  2010-12-23 09:49:57 UTC (rev 8112)
> > +++ branches/branch-1.3/src/Fl.cxx  2010-12-23 14:24:29 UTC (rev 8113)
> > @@ -667,7 +667,7 @@
> >   */
> >   void Fl::first_window(Fl_Window* window) {
> >     if (!window || !window->shown()) return;
> > -  fl_find(fl_xid(window));
> > +  fl_find( Fl_X::i(window)->xid );
> >   }
>
> And you add in src/Fl_cocoa.mm:
>
> > Modified: branches/branch-1.3/src/Fl_cocoa.mm
> > ===================================================================
> > --- branches/branch-1.3/src/Fl_cocoa.mm     2010-12-23 09:49:57 UTC (rev 
> > 8112)
> > +++ branches/branch-1.3/src/Fl_cocoa.mm     2010-12-23 14:24:29 UTC (rev 
> > 8113)
> > @@ -3266,6 +3266,11 @@
> >     return CGRectMake(x, y, w>  0 ? w - 0.9 : 0, h>  0 ? h - 0.9 : 0);
> >   }
> >
> > +Window fl_xid(const Fl_Window* w)
> > +{
> > +  return Fl_X::i(w)->xid;
> > +}
> > +
> >   #endif // __APPLE__
>
> AFAICT fl_xid is declared inline on other platforms, thus I suggest
> to leave it as is in Fl.cxx, but maybe there is a difference on Mac OS,
> or is it only a testing issue that you forgot to revert? I don't have
> a Mac here, so I can't test.
>
> Albrecht

I had to stop declaring fl_xid inline under OS X because the class
Fl_X is not part of the public API, whereas fl_xid() is.
This explains why I added fl_xid() to Fl_cocoa.mm.
The Fl::first_window() function is the single instance in all of
FLTK that calls fl_xid(). Not to loose in efficiency with
the loss of inlining, I have replaced it by its equivalent.
This explains the change in Fl.cxx.

In sum, these changes are quite volontary. I have checked that
make builds under Linux and MSWindows, and make+CMake+Xcode builds
under Mac OS X all run smoothly.

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

Reply via email to