mirror of
https://github.com/brl/mutter.git
synced 2025-02-04 15:44:10 +00:00
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 {
|
typedef enum {
|
||||||
META_LIST_DEFAULT = 0, /* normal windows */
|
META_LIST_DEFAULT = 0, /* normal windows */
|
||||||
META_LIST_INCLUDE_OVERRIDE_REDIRECT = 1 << 0, /* normal and O-R */
|
META_LIST_INCLUDE_OVERRIDE_REDIRECT = 1 << 0, /* normal and O-R */
|
||||||
|
META_LIST_SORTED = 1 << 1, /* sort list by mru */
|
||||||
} MetaListWindowsFlags;
|
} MetaListWindowsFlags;
|
||||||
|
|
||||||
#define _NET_WM_STATE_REMOVE 0 /* remove/unset property */
|
#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,
|
static void prefs_changed_callback (MetaPreference pref,
|
||||||
void *data);
|
void *data);
|
||||||
|
|
||||||
|
static int mru_cmp (gconstpointer a,
|
||||||
|
gconstpointer b);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_display_get_property(GObject *object,
|
meta_display_get_property(GObject *object,
|
||||||
guint prop_id,
|
guint prop_id,
|
||||||
@ -1061,6 +1064,9 @@ meta_display_list_windows (MetaDisplay *display,
|
|||||||
tmp = next;
|
tmp = next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (flags & META_LIST_SORTED)
|
||||||
|
winlist = g_slist_sort (winlist, mru_cmp);
|
||||||
|
|
||||||
return winlist;
|
return winlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user