Re: Window with background Image



Greg Breland wrote:

I've been working on this problem for 6 hours now so any help would be
appreciated.  I've created a simple test app to try to figure out what
I'm doing wrong.  I've read everything in the archives even remotely
related to this issue.

I'm needing a background image on a window to indicate that the window
is in edit mode, similar to the way glade paints the cross hatch
pattern.  I'm not getting any errors with the code below, but I'm also
not seeing my image and I don't know what else to try.  Here is the
simple testing app I have right now:

[snip]


   gdk_window_set_back_pixmap(gtk_widget_get_root_window(window),
pixmap, FALSE);

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.

   -brian



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