Widget shell;
Atom *protocols;
int num_protocols;
This function takes a list of protocols, so you can use it to add as many protocols as you like at one time.
17.4.2 Saving Application State
A session manager is an application that acts something like a window manager. However, rather than controlling
only the windows on a screen, it monitors the actual applications running on that screen. Frequently, session managers
allow the user to start, terminate, or even restart any program automatically, through a variety of interface controls.
Session managers may even cause a program to "sleep" by terminating all its keyboard and mouse input, so as far as
the program is concerned, the user is just not interacting with it.
At the moment, there are not many full session managers available, so much of the possible functionality is uncharted.
This section discusses one aspect of proposed session manager behavior and how it might be implemented. This
behavior concerns the ability of an application running under the session manager to restart itself at the point where it
left off in a previous session.
If the session manager decides that it might terminate (which might result in the entire X connection terminating), it
may send a request to all its applications to save their internal state so they can be restarted later. In this case, the
session manager sends a WM_SAVE_YOURSELF protocol message. According to the ICCCM, client applications that
can save their current state and restart from that state ...