I know, that I can 'close' an X11 Window by calling:
XDestroyWindow(display, id);
The problem is, this destroyes the window immediately. On the other hand, if i click the close button (x in the title bar) the app can show something like "Do you really want to exit?".
So how can I emulate this type of window closing?
Background: I am closing windows from other applications, not my own
I found a solution:
Where
d
is the display handle andid
is the window ID.CREDIT: https://john.nachtimwald.com/2009/11/08/sending-wm_delete_window-client-messages/