GNOME Bugzilla – Bug 595882
Add meta_window_get_stable_sequence
Last modified: 2009-09-22 16:43:53 UTC
Useful for plugins which want to order windows in a stable fashion.
Created attachment 143642 [details] [review] Add meta_window_get_stable_sequence
Review of attachment 143642 [details] [review]: Hmm, it feels to me that there should be something already existing that can be used for this, but I can't think of what, so I'm fine with the addition. OK to commit with a few small tweaks noted below. ::: src/core/window.c @@ +806,3 @@ + * for sorting. + */ + window->stable_sequence = display->window_sequence_counter++; Suggest ++<...> so that the first window gets 1 not 0, which is more confusable with an uninitialized value. @@ +8544,3 @@ + * + * This number can be useful for sorting windows in a stable + * fashion/ '/' instead of '.' Should have a '@window: a #MetaWindow' and 'Return value: the sequence number for this window' @@ +8549,3 @@ +meta_window_get_stable_sequence (MetaWindow *window) +{ + return window->stable_sequence; Should have a g_return_val_if_fail
Attachment 143642 [details] pushed as d399141 - Add meta_window_get_stable_sequence