Re: style bg_pixmaps and gtk_widget_shape_combine_mask
- From: Owen Taylor <otaylor redhat com>
- To: Paul Barton-Davis <pbd Op Net>
- Cc: gtk-list redhat com
- Subject: Re: style bg_pixmaps and gtk_widget_shape_combine_mask
- Date: 15 Mar 1999 10:54:12 -0500
Paul Barton-Davis <pbd@Op.Net> writes:
> Any ideas on how I can use the pixmaps created by/for a style as a
> mask in gtk_widget_shape_combine_mask() without getting a BadMatch
> error from the Xserver ?
>
> I suspect its caused by the fact that the window for the widget
> doesn't match the NULL window used to create the pixmap.
A mask needs to have a depth of 1 bit. (That is transparent/
non-transparent)
Unless you are running a black-and-white Xserver, the
pixmaps loaded by the RC file are not going to have
a depth of 1...
You could load
style->rc_style->bg_pixmap_name[state]
yourself with gdk_pixmap_create_from_xpm(),
and then get both the pixmap and mask for the file,
but in general this operation doesn't make a lot of sense
for me.
- If you want to use a pixmap and mask in your program
explicitely, there is no reason to go through an
RC file. Just load them directly.
- If you want shaped bg pixmaps for widgets, use
the pixmap theme engine which is meant to handle
such things.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]