> This is one of the points I don't get: I first create a > window and then I show it, isn't this just enough to have a > window mapped?
No - that's not a safe assumption. It is generally the case these days that the actual rendering will occur pretty much asynchronoulsy (even more so now that we all have multi-core CPU's calling fancy accelerated GPU's) so a lot of the low-level OS calls (on X11, win32 or OSX) will return execution to your program a long time before they actually action your requesrt... Add to that the way fltk deliberately decouples rendering from the code sequence, or X11's remote abilities and etc... Well, lets just say that when your code returns from a window->show(); call, you can be pretty sure your window is not actually mapped yet! > or maybe I should force the window creation by Fl::flush() ? That'll do it, certainly, but that seems to me like a workaround. > And a more fundamental remark is: why isnn't such a offscreen > totally independent of the widgets, visualized or not? The assumption is that whtever you draw in your offscreen you will, at some point, want to blit into a view, so you need to know the format of the view to be able to make a compatible offscreen context. Ideally this wouldn't be necessary, but we need to be cross-platfom compatible, so we have a bit of a lowest-common-denominator thing going on here. > Aha, I see. well, this looks to me as a workaround. In what way? > Is this the only way to go? I already developed a quite complex > system, It doesn't feel right to manipulate again the > callbacks of my already complex widget structure ... Probably not the only way, but it is effective and straightforward. But I do not know your code, so YMMV. I confess I do not understand why this change would make much, if any, diference to how your widget callbacks operate. > I'm analyzing your example now, indeed there was just that > example from Lukasz in the general forum. OK - hope it makes some sense! I left out the comments... SELEX Sensors and Airborne Systems Limited Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk