How to make a gtk Layout have a transparent bin window?



Hi folks,

I'm struggling with a problem.  I want to have a Layout as a child of a
Layout, where the child Layout window is transparent,
so that any drawing done to the parent Layout "shows through".

I've established that a gtk Frame has a transparent window; if you place
a Frame on a Layout and draw to the underlying Layout,
the underlying drawing will show through (except for a few pixels
associated with the Frame border).

>From what I can tell, Frames don't touch their backgrounds at other, so
the defaults apply, while Layouts do the following:

  gtk_style_set_background (widget->style, widget->window,
GTK_STATE_NORMAL);
  gtk_style_set_background (widget->style, layout->bin_window,
GTK_STATE_NORMAL);

This in turn invokes the style code that sets the background pixmap to
NULL or to the bg_pixmap for the specified
state.

I've tried making the bg_pixmap NULL (actually None since I'm using
gtk), as well as some other approaches,
but the child Layout window and bin_window always get rendered with the
defualt background color or pixmap.

Does anybody know how to make a Layout window transparent?  I know frame
can do it, so I suspect I can write
my own widget that derives from Container, but there's gotta be a
"right" way.

Dave



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]