Quoting Costin Manolache: > Hi, > > The Gdk-directfb implementation is using GetSubsurface to create all > CHILD widgets ( button, etc ).
Yes, each GdkWindow that is not a top level window is realized via GetSubSurface(). A sub surface is just another graphics context with a fixed x/y offset and a limited clipping region. This limited region is defined during GetSubSurface() and is limited to the region of the (sub) surface which is used to create the new sub surface. > I was wondering what is the plan to deal with layered widgets ( i.e. > widgets that cover each other ) ? Currently this doesn't seem to work, > and some gtk code that works fine in X11 is not working with dfb. I > couldn't find the code implementing z-order for subsurfaces or > surfaces. There's no code in DirectFB dealing with the z-order of sub surfaces, because there is neither an order nor any hierarchy except the capability to be a sub surface. The order is defined by the application, or in this case by GDK. > I tried to change the code to use CreateSurface or CreateWindow for > the childs - but so far I get the same problem, no layering works. CreateWindow() and CreateSurface() allocate extra memory which would grow quickly if they are called for each child window. In X11 only the root window is allocated in memory, other windows are embedded in this window like the sub surfaces are in DirectFB toplevel windows. > I also tried to pass DSCAPS_DEPTH ( I couldn't find any doc, but from > the code it looks to be related :-) when creating the window or shell > - however it allways crashes. It shouldn't crash. Apart from that it has nothing to do with z-order of widgets, but only activates allocation of an extra z-buffer for 3D rendering using IDirectFBSurface::TextureTriangles(). > Is DSCAPS_DEPTH supposed to solve this problem or is it a wrong guess > ? Do you have any example on how to use it ? It's used by the df_texture example. > Also, looking at the sources I couldn't find where ( and how ) the > parent/child relation between surfaces and windows is implemented. You'd have to look at the GDK DirectFB sources, or even GTK? If you provide a small example which works in GDK X11, but doesn't in GDK DirectFB, I will try to fix it. I think there was a bug with obscured widgets, e.g. using tabbed dialogs. -- Best regards, Denis Oliver Kropp .------------------------------------------. | DirectFB - Hardware accelerated graphics | | http://www.directfb.org/ | "------------------------------------------" Convergence GmbH
