The Xserver itself is capable of terminating itself once all X11 clients are gone, yet in a typical full session, there are a number of X11 clients running continuously (e.g. the Xsettings daemon, IBus, etc.).
Those always-running clients will prevent the Xserver from terminating, because the actual number of X11 clients will never drop to 0.
To solve this issue directly at the Xserver level, this add new entries to the XFixes extension to let the X11 clients themselves specify the disconnect mode they expect.
Typically, those X11 daemon clients would specify the disconnect mode XFixesClientDisconnectModeShutdown to let the Xserver know that they should not be accounted for when checking the remaining clients prior to terminate.
A one-time daemon that can be safely stopped at server reset would use XFixesClientDisconnectModeReset to instruct the Xserver to reset even though that client is still running.
Signed-off-by: Olivier Fourdan email@example.com