Re: [gtk-list] Re: window icon
- From: Leonardo Zide <leonardo centroin com br>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: window icon
- Date: Thu, 20 Apr 2000 17:33:22 -0300
Havoc Pennington wrote:
> The X server holds a reference to the server-side object, so GDK
> doesn't bother to keep a client-side reference.
But when I call gdk_pixmap_unref, it doesn't check the reference count
on the server side, it calls XFreePixmap () if its own reference count
> In any case it shouldn't matter to you - if you're going to use the
> pixmap again _you_ must hold a reference, even if you think someone
> else already does. Them's the rules in a refcounted world.
The problem is that I'm not going to use the pixmap again, I just set
the window icon and then I don't need it anymore. If I call:
load_pixmap ("icon.xpm", window, &pixmap, &mask);
gdk_window_set_icon (window->window, NULL, pixmap, mask);
Then the icon is not set but if I remove the last 2 lines then
everything works. When the window is destroyed, does it decrease the
reference count of the GdkPixmap or should I do it myself ?
] [Thread Prev