class XWindow implements DisplaySurface {

    @Override
    public ListenableFuture<Void> destroy() {
        final int winId = getWindowId();
        return this.xExecutor.submit(new Runnable() {

            @Override
            public void run() {
                LOG.debug("[winId={}] destroy.",
                        winId);
                xcb_destroy_window(getConnectionRef(),
                        winId);
                xcb_flush(getConnectionRef());
            }
        },
                null);
    }

    @AssistedInject  XWindow(final XTime xTime,
            final XConnection xConnection,
            @Nonnull @Assisted final DisplaySurfaceHandle resourceHandle,
            @DisplayExecutor final ListeningExecutorService xExecutor);

}