display: Optionally sort window list
https://bugzilla.gnome.org/show_bug.cgi?id=737581
This commit is contained in:
parent
a9a21c801c
commit
9f8b641472
@ -57,6 +57,7 @@ typedef struct MetaEdgeResistanceData MetaEdgeResistanceData;
|
||||
typedef enum {
|
||||
META_LIST_DEFAULT = 0, /* normal windows */
|
||||
META_LIST_INCLUDE_OVERRIDE_REDIRECT = 1 << 0, /* normal and O-R */
|
||||
META_LIST_SORTED = 1 << 1, /* sort list by mru */
|
||||
} MetaListWindowsFlags;
|
||||
|
||||
#define _NET_WM_STATE_REMOVE 0 /* remove/unset property */
|
||||
|
@ -150,6 +150,9 @@ static void update_cursor_theme (void);
|
||||
static void prefs_changed_callback (MetaPreference pref,
|
||||
void *data);
|
||||
|
||||
static int mru_cmp (gconstpointer a,
|
||||
gconstpointer b);
|
||||
|
||||
static void
|
||||
meta_display_get_property(GObject *object,
|
||||
guint prop_id,
|
||||
@ -1061,6 +1064,9 @@ meta_display_list_windows (MetaDisplay *display,
|
||||
tmp = next;
|
||||
}
|
||||
|
||||
if (flags & META_LIST_SORTED)
|
||||
winlist = g_slist_sort (winlist, mru_cmp);
|
||||
|
||||
return winlist;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user