On Thu, Jan 08, 2004 at 10:09:09PM +0100, micronuke wrote:
> Hello,
> 
> is it possible to create an IDirectFBWindow without a surface? Or create a 
> window with a surface, then at some point take its surface away and later 
> attach a surface to it?
> 
> This may sound strange.. thus I'll explain. Every DirectFB-window has a 
> surface attached to it.. When you have many windows, this can easily need 
> a lot of memory. If I have a window that doesn't have focus and doesn't 
> need to be updated until it gets focus again I could blit it onto the 
> primary surface, remove its surface (and thus free the memory) and later 
> when a focus event arrives recreate and redraw the surface (if I remove 
> the complete IDirectFBWindow there won't be any more focus events ;).

You need the surface for window stack updates. DirectFB doesn't have
expose events like X.

> I 
> think it can also be quite handy when trying to implement something like 
> window minimizing.. then you didn't have to destroy the window when 
> minimizing it, and having 20 large windows and 19 of them minmized 
> wouldn't eat up memory for 20 surfaces..

But the apps may continue to draw to the surface anyway so it wouldn't
really work.

-- 
Ville Syrj�l�
[EMAIL PROTECTED]
http://www.sci.fi/~syrjala/


--
Info:  To unsubscribe send a mail to [EMAIL PROTECTED] with
"unsubscribe directfb-dev" as subject.

Reply via email to