Hm.  Wouldn't that just return a query with valid windows, rather than actually preventing the creation of invalid windows?