Is there a way to send a message or trigger a callback when closing a window? This would be useful to cleanup state in a multi-window application when, for example, popping up a modal.
(Yes, I know that window decorations can be disabled, but unfortunately that doesn’t help if the window is closed with a keybinding, e.g. Mod+Shift+Q or Alt-F4)