Hi Sven,

Sorry, I used the wrong words. I'm using SWT+GTK+DFB - and I'm not
very familiar with all the terms.

When you create a widget ( button, label, etc ), you can specify the
absolute position and size. You may have overlaping widgets - and they
should be displayed in the z-order of the widget. By default the
zorder is given by the order you add childs to the parent - newest
child is above. This can be controlled with moveAbove(swt) which is
mapped to gdk_window_raise().

What happens is that the newest widget is initially drawn correctly,
on top, the correct z-order. However if anything is changed in the
older widget ( which may be completely behind the new one ), the old
widget will pop us and cover the widgets above. For example - if the
old widget bellow is a button and you change the label, it will be
redrawn and become visible on top - there is no check to verify if it
is covered by another widget.

>From what I can see ( and I'm clearly not an expert ), the xserver
provides this zordering, and keeps the widget bellow hidden even if it
is updated.

I tried to find if gtk itself has any code to implement z-order - but
so far I couldn't find anything, so I assumed the gdk and lower layer
is responsible for this. But the only reference I found in directfb is
the "DEPTH" for surfaces, and I'm not even sure if it is intended for
this or is something else.

Costin

On 17 Aug 2004 10:42:09 +0200, Sven Neumann <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> Costin Manolache <[EMAIL PROTECTED]> writes:
> 
> > The Gdk-directfb implementation is using GetSubsurface to create all
> > CHILD widgets ( button, etc ).
> >
> > 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.
> 
> Layered widgets? GTK+ doesn't support widgets that aren't completely
> inside the parent widget. If there is code that you claim to work in
> X11 then that code is broken and only works by accident.  Noone will
> guarantee you that it will continue to work with future GTK+ versions.
> 
> 
> Sven
> 
>


Reply via email to