mirror of
https://github.com/elementary/gala.git
synced 2024-11-25 03:06:14 +01:00
Sort by stacking order
This commit is contained in:
parent
219d67f9a7
commit
a336401385
@ -175,7 +175,7 @@ namespace Gala {
|
||||
* the resulting spots.
|
||||
*/
|
||||
public void reflow (bool with_gesture = false, bool is_cancel_animation = false) {
|
||||
if (!opened) {
|
||||
if (!opened || get_n_children () == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -185,19 +185,6 @@ namespace Gala {
|
||||
windows.prepend ({ clone.window.get_frame_rect (), clone });
|
||||
}
|
||||
|
||||
if (windows.is_empty ()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// make sure the windows are always in the same order so the algorithm
|
||||
// doesn't give us different slots based on stacking order, which can lead
|
||||
// to windows flying around weirdly
|
||||
windows.sort ((a, b) => {
|
||||
var seq_a = ((WindowClone) a.id).window.get_stable_sequence ();
|
||||
var seq_b = ((WindowClone) b.id).window.get_stable_sequence ();
|
||||
return (int) (seq_b - seq_a);
|
||||
});
|
||||
|
||||
#if HAS_MUTTER45
|
||||
Mtk.Rectangle area = {
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user