If a client window is already open when amiwm starts, amiwm doesn't put
a WM_STATE property on that window. I expected that it would do so.
This usually only happens if a client starts up faster than the window
manager or if you start from a bare server+xterm with no window manager
and then run one up later.
The script xterm-first.sh below can demonstrate the problem, using xvfb
(from the xvfb package) for a handy bare server,
xvfb-run sh xterm-first.sh
prints after 4 seconds,
xterm starts
amiwm starts
look at xterm props
AMIWM_SCREEN(STRING) = "desk one"
...
with no WM_STATE among the properties shown.
As a comparison, the second script amiwm-first.sh below shows instead
the expected WM_STATE if amiwm starts first and xterm second,
xvfb-run sh amiwm-first.sh
prints
amiwm starts
xterm starts
look at xterm props
WM_STATE(WM_STATE):
window state: Normal
icon window: 0x0
...