Note that the usual place to create the offscreen is in a draw method, so the gc will always be valid in that case.
Not sure what to do in your example though. How about cheating? Create a 1x1 window at some x,y that is outside the visible and base the gc on that? -- Ian Sent, much to my surprise, from my iPhone On 3 Jul 2012, at 10:22, fltk.orib <[email protected]> wrote: > Using an fl_offscreen on X before ->make_current() is called on a real window > will cause a segfault, because there is still no GC at that point. > > (No problem on Win32; don't know about Mac) > > Is there a way to create said GC without creating a window (and then > iconizing it, because hiding it will destroy the GC?). > _______________________________________________ > fltk mailing list > [email protected] > http://lists.easysw.com/mailman/listinfo/fltk _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

