ported to Purity::Window