Re: Window with background Image



Thanks Brian, you've gotten me very close to solving this problem.  When
I use window->window instead of getting the root window, I now see my
background image for short periods of time when portions of the window
are newly exposed such as during resize and when other windows are moved
over it just like Russell's email suggested.  

Just wondering, where did you find the window->window property?  I
looked through the entire widget hierarchy (GtkBin, GtkContainer,
GtkWidget, etc.) and didn't see this property.

I'm using FC2/Gnome with the default WM MetaCity.  I hooked up the
"style-set" event on the window, both normal and _after,  but this
doesn't seem to be helping.  I also tried the "realize" and "show"
events with no luck.  You can see the source as it stands after your
advice at:

http://home.atlee.net/background.c

On Sun, 2005-02-06 at 00:11, Brian J. Tarricone wrote:
You're trying to set the bg pixmap of the screen's root window.  You 
want to set it on the GdkWindow of the widget itself:
gdk_window_set_back_pixmap(window->window, pixmap, FALSE);

Note that gtk themes that have pixmap window backgrounds set may 
override this, so you'd want to connect to the GtkWindow's style-set 
signal, and re-set the bg pixmap in that signal handler.





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