Move logic for syncing the stack to the X server into MetaStackTracker

stack.c:sync_stack_to_xserver had both code for assembling the desired stack, and
code for enforcing the desired stack on the actual stack of X and Wayland windows;
the latter part is properly the domain of stack-tracker.c; moving the code to
apply the stack there both simplifies it and keeps stack.c more manageable.

https://bugzilla.gnome.org/show_bug.cgi?id=736559
This commit is contained in:
Owen W. Taylor
2014-09-10 11:58:42 -04:00
parent 301acac163
commit 04bc846ef3
3 changed files with 108 additions and 265 deletions

View File

@ -73,9 +73,13 @@ void meta_stack_tracker_lower_below (MetaStackTracker *tracker,
guint64 sibling);
void meta_stack_tracker_lower (MetaStackTracker *tracker,
guint64 window);
void meta_stack_tracker_restack_windows (MetaStackTracker *tracker,
void meta_stack_tracker_restack_managed (MetaStackTracker *tracker,
const guint64 *windows,
int n_windows);
void meta_stack_tracker_restack_at_bottom (MetaStackTracker *tracker,
const guint64 *new_order,
int n_new_order);
/* These functions are used to update the stack when we get events
* reflecting changes to the stacking order */