*/
Atom[] getWmState(Display display, Window win) {
ArrayList<Atom> res = new ArrayList<Atom>();
Window.PropertyReply rep = win.property(false, netWmState, Atom.ATOM,
0, 5);
Enum enm = rep.items();
while (enm.more()) {
Atom atom = (Atom) Atom.intern(display, enm.next_integer());
res.add(atom);
logger.fine("WM State: " + win + " " + atom);
}
if (res.size() > 0) {
return res.toArray(new Atom[res.size()]);