Re: XCB_DESTROY_NOTIFY & SIGTERM
Steven J Abner <[email protected]> Wed, 04 Dec 2024 14:00:29 -0500
| Newsgroups | gmane.comp.freedesktop.xcb |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Dec 4 2024 at 05:32:06 PM +0000, Uli Schlachter <[email protected]> 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