I had some problems regarding offscreen drawing - sometimes it worked,
sometimes not. I found modal loops causing the problem, e.g. dialogues
or menus. They seem to catch the graphic and offscreen drawing starts to
work, when those windows are totally cleared:
Fl_Native_File_Chooser chooser(Fl_Native_File_Chooser::BROWSE_FILE);
if (!chooser.show())
{
m_Log.Load(chooser.filename());
if (m_Log.Error.empty())
{
// while (Fl::modal()) doesn't work:
for (unsigned i= 0; i< 3; ++i)
{ // Clear graphic
Fl::check();
os_fkt::Sleep(100);
}
Do_Eval_Log(m_Log); // offscreen drawing!
}
}
When debug stops at for loop, the whole dialog is shown on screen. First
loop deletes it content, second loop removes window, third loop might
not be necessary, but can I be sure? Is there a better way to check for
graphical clearance and make sure it also works on other/slower computers?
In the moment I'm using Linux, but I think this problem is FLTK (1.3)
related and also appears on Windows.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk