Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort windows by stacking order before workspace switch #2013

Merged
merged 3 commits into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/WindowManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -1990,13 +1990,17 @@ namespace Gala {
var from_has_fullscreened = false;

// collect all windows and put them in the appropriate containers
foreach (unowned Meta.WindowActor actor in display.get_window_actors ()) {
var slist = new GLib.SList<Meta.Window> ();
display.list_all_windows ().@foreach ((win) => {
slist.append (win);
});
foreach (unowned var window in display.sort_windows_by_stacking (slist)) {
unowned var actor = (Meta.WindowActor) window.get_compositor_private ();

if (actor.is_destroyed ()) {
continue;
}

unowned var window = actor.get_meta_window ();

if (!window.showing_on_its_workspace () ||
move_primary_only && !window.is_on_primary_monitor () ||
window == moving ||
Expand Down
Loading