GNOME Bugzilla – Bug 85719
gdk_window_destroy() docs
Last modified: 2011-02-04 16:10:07 UTC
The docs for gdk_window_destroy() are very wrong: /** * gdk_window_destroy: * @window: a #GdkWindow * * Destroys @window (destroys the server-side resource associated with * @window). Memory allocated for @window may not be freed until all * references to @window are dropped. All children of @window are also * destroyed. * * There's normally no need to use this function, window are automatically * destroyed when their reference count reaches 0. */ A) gdk_window_destroy() has all sorts of visible side effects. B) GDK actually warns if you unref a window to zero without destroying it. if (!GDK_WINDOW_DESTROYED (window)) { if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_FOREIGN) { g_warning ("losing last reference to undestroyed window\n"); _gdk_window_destroy (window, FALSE); } [...] }
Created attachment 11506 [details] [review] better description for gdk_window_destroy()
Does this look right?
Looks basically good. I might say, instead of: "All children of @window are also destroyed" "The window system resources for all children of @window are also destroyed" Since "destroy" by itself is rather ambiguous.
Committed with that change.