boolean (JFrame frame, long name, long expected) { if (X11 == null) return false; try { ComponentPeer peer = AWTAccessor.getComponentAccessor().getPeer(frame); if (peer != null) { long window = (Long)X11.getWindow.invoke(peer); long[] values = X11.getLongArrayProperty(window, name, XA_ATOM); if (values != null) { return ArrayUtil.indexOf(values, expected) != -1; } } return false; } catch (Throwable t) { LOG.info("cannot check window property", t); return false; } }