### Method

# Meta Window foreach_ancestor

#### Declaration [src]

    void
    meta_window_foreach_ancestor (
      MetaWindow* window,
      MetaWindowForeachFunc func,
      void* user_data
    )

#### Description [src]

If `window` is transient, call `func` with the window for which it’s transient, repeatedly until either we find a non-transient window, or `func` returns `FALSE`.

#### Parameters

`func`

  Type: `MetaWindowForeachFunc`

  Called for each window which is a transient parent of `window`.

`user_data`

  Type: `void*`

  User data.

  The argument can be `NULL`.
  The data is owned by the caller of the function.