static <A> AutoCloseable tempDisposeWindow(final Window w) {
  ret new AutoCloseable {
    public void close() {
      disposeWindow(w);
    }
  };
}