def view_is_transient(view):
    """Return whether a view can be considered 'transient'.

    We especially want to exclude widgets and preview views.
    """

    # 'Detached' (already closed) views and previews don't have
    # a window.
    window = view.window()
    if not window:
        return True

    if view.settings().get('is_widget'):
        return True

    return False