Previously, adding a new atom into the code required:
1. In <icc.h>, add the line `extern Atom my_new_atom;` declaring the new atom.
2. In <icc.c>, add the line `Atom my_new_atom;` defining the new atom.
3. In <icc.c>, add the line `my_new_atom = XInternAtom(dpy, "MY_NEW_ATOM", False);`
interning this new atom, and assigning the interned value to the variable.
Now, just add a line with the atom's name in the X-MACRO in <icc.h>, and
a XInternAtoms(3) and a set of macros will do the rest.
All new atoms will be referred to as an entry in the ATOMS[] array.
For example:
ATOMS[MY_NEW_ATOM]
The exception are for those REALLY OLD atoms that have already a
dedicated compile-time-known value defined at <X11/Xatom.h>. Those
do not need to be interned; and are referred to with a constant
beginning with the `XA_` prefix. For example:
XA_WM_CLASS
If the clock timer fires when global scr is NULL then we end up calling
redrawmenubar() with a NULL global scr, but a valid local scr.
So just pass in the scr used when doing "stuff" into redrawmenubar(),
making the 'scr' in redrawmenubar() also local scope.
This adds a command to iterate over the set of windows. It's not
like alt-tab in ye olde windows world where you'd alt tab once to
switch between two windows, and then keep alt-tab'ing with alt down
to go through the window list. For now it just literally iterates
through those windows.
This makes it a lot easier to work with a large number of open
windows without having to constantly use the mouse.
* ensure newly created windows are placed somewhere visible - ie, not
off the screen.
* ensure newly created window sizes aren't insanely large, which end up
being unable to be moved or resized in amiwm.
This has shown up with gtk apps (kicad, firefox) with their load/save
dialog. For some reason they want to be almost 2x my desktop size,
making them super hard to use.
Although it likely doesn't matter /that/ much, the x11 xlib manual
does say to use it rather than expecting the struct to stay the same
size.
Yeah yeah it's 2022 and we really do build things from source,
ICCCM is likely not going to change that much nowdays, etc, etc.