David Ibbitson wrote:
> I've noticed that Fl_Native_File_Chooser seems to block events
> in Fl_Gl_Window.  

        Yes, while the chooser is open, the rest of FLTK is "blocked"
        IIRC. That is pretty much the only way it can work, I think,
        due to how the chooser has to use OSX's own application loop.

> I have an animation taking place in my OpenGL
> window based on add_timeout/repeat_timeout.  When I open
> Fl_Native_File_Chooser, (which partially covers the window),
> my animation stops. If I cancel, the animation resumes, 

        There might be a way to modify this to keep FLTK alive,
        but I'm not sure that's a 'safe' thing to do.

        I coded FNFC, but admittedly don't know enough about how
        FLTK/OSX integrate at the lower level to know if it's possible
        to have the native chooser open at the same time FLTK events
        are allowed to be processed.

> and
> if I click ok, the image in the window freezes, like its
> not swapping back buffer to front.

        Ew, that does sound like a bug.

> Strangely taking
> out glFlush() in my draw() function seems to fix this.
> Greg, I'm just wondering if its normal for the chooser
> to "block events". 

        Yes, as written I think it is.

        I'm not sure it has to be that way though.. some advice from
        Matthias might be needed here, or someone familiar with the
        intimacies of FLTK <-> OSX event processing to look over my
        OSX specific code in FNFC to see if using the FLTK event loop
        would be possible while the native chooser is open.

> I also tried Fl_File_Chooser, and my
> animation continues uninterrupted.

        Right, because it's an FLTK oriented chooser, FLTK can be
        alive during the event loop.

> Next, this problem may have popped with the with 10.5.3 update.
> I'm just wondering if anybody has noticed any problems with
> FLTK and OpenGL because of this update.

        The GL specific freeze problem does sound like a bug somehow.

        You might need to do the flush before opening the chooser
        or something.

        If you can show me a small, compilable example program that
        demonstrates this, I'll see if I can figure it out.

        At some point FNFC implementation needs to be 'blessed'
        by the FLTK core folks to ensure it's properly implemented,
        as it does get into platform specific event management
        which has bitten me before.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to