XCB_DESTROY_NOTIFY & SIGTERM
Steven J Abner
pheonix.sja at att.net
Wed Dec 4 19:00:29 UTC 2024
On Wed, Dec 4 2024 at 05:32:06 PM +0000, Uli Schlachter
<psychon at znc.in> wrote:
> How come you only get XCB_DESTROY_NOTIFY for your window? Normally,
> one uses the WM_DELETE_WINDOW to get a notification and destroy the
> window oneself. That way, you can clean up your cairo resources
> before the window is gone.
On WM_DELETE_WINDOW:
/* check transients, appropriate branch */
xcb_unmap_window(connection, window);
/* user save stuff, non-transient */
xcb_destroy_window(connection, window);
xcb_flush(connection);
which yields a XCB_DESTROY_NOTIFY at which point:
free/destroy data that was attached to destroy->window (event), from
list.
But what you are implying is that cairo is wrong in that "The caller
owns the surface and should call cairo_surface_destroy() when done with
it.", and it's owned by xcb?
Easy enuf to move after user save, I think?. Would create 2 locations
for resource deletion. Maybe a cairo ownership issue? Insights, on
cairo if any?
And to both of you, thank you for explanation on how to decrypt generic
error :)
Steve
More information about the Xcb
mailing list