### Method

# Meta Display sort_windows_by_stacking

#### Declaration [src]

    GSList*
    meta_display_sort_windows_by_stacking (
      MetaDisplay* display,
      GSList* windows
    )

#### Description [src]

Sorts a set of windows according to their current stacking order. If windows from multiple screens are present in the set of input windows, then all the windows on screen 0 are sorted below all the windows on screen 1, and so forth. Since the stacking order of override-redirect windows isn’t controlled by Metacity, if override-redirect windows are in the input, the result may not correspond to the actual stacking order in the X server.

An example of using this would be to sort the list of transient dialogs for a window into their current stacking order.

#### Parameters

`windows`

  Type: A list of `None`

  Set of windows.

  The data is owned by the caller of the function.

#### Return value

Type: A list of `None`

Input windows sorted by stacking order, from lowest to highest.

The caller of the method takes ownership of the data container, but not the data inside it.