Re: [gtk-list] Background pixmap problem...



I don't know about shape mask, but once I put the question on the mail list
for how to set background pixmap, and I got answer. So I hope the following
can help:

according to this function calling sequence:
1.    gtk_widget_realize(widget)
2.    gtk_widget_set_app_paintable(widget)
3.    gdk_window_set_back_pixmap(widget)

if the sequence is wrong, the result maybe wrong.

This one works on GtkWindow, but may not be useful for some other widgets.

Hope it can help.

Jiang

Leo Reiter wrote:

> I would like to know how I can make a shaped window with a pixmap.  I
> have rendered the
> pixmap already, and I load it from disk with
> gdk_pixmap_create_from_xpm().
>
> Then, I do a gdk_window_set_back_pixmap on the window, and do a
> gdk_window_shape_combine_mask() with its mask.  I also tried
> gtk_widget_shape_combine_mask(), but have had the same results - a
> square box is
> rendered using the default background color, with no pixmap and no
> shape.  I tried adding
> a gtk_widget_set_app_paintable() call, which allows me to render the
> pixmap, but it does
> not shape the window.
>
> Are there any caveats to doing this?  Should I use a specific color for
> the transparent
> parts of the pixmap?  (I've tried black, white, and gray, with no luck.)
>
> Any help would be appreciated.
>
> Thanks,
>
> Leo Reiter
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null



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