From b28dda8a69194b71e2b6e4db13a8efead72ea954 Mon Sep 17 00:00:00 2001 From: Leonhard Kargl Date: Wed, 11 Dec 2024 01:42:32 +0100 Subject: [PATCH] WindowManager/workspace switcher: Fix stacking order of moving window --- src/WindowManager.vala | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/src/WindowManager.vala b/src/WindowManager.vala index 37d69c639..5b1d86636 100644 --- a/src/WindowManager.vala +++ b/src/WindowManager.vala @@ -1964,29 +1964,7 @@ namespace Gala { } main_container.add_child (static_windows); - // if we have a move action, pack that window to the static ones - if (moving != null) { - unowned var moving_actor = (Meta.WindowActor) moving.get_compositor_private (); - - windows.prepend (moving_actor); - parents.prepend (moving_actor.get_parent ()); - - moving_actor.set_translation (-clone_offset_x, -clone_offset_y, 0); - clutter_actor_reparent (moving_actor, static_windows); - } - unowned var grabbed_window = window_grab_tracker.current_window; - - if (grabbed_window != null) { - unowned var moving_actor = (Meta.WindowActor) grabbed_window.get_compositor_private (); - - windows.prepend (moving_actor); - parents.prepend (moving_actor.get_parent ()); - - moving_actor.set_translation (-clone_offset_x, -clone_offset_y, 0); - clutter_actor_reparent (moving_actor, static_windows); - } - var to_has_fullscreened = false; var from_has_fullscreened = false; @@ -2002,15 +1980,11 @@ namespace Gala { continue; } - if (!window.showing_on_its_workspace () || - move_primary_only && !window.is_on_primary_monitor () || - window == moving || - window == grabbed_window) { - + if (!window.showing_on_its_workspace () || move_primary_only && !window.is_on_primary_monitor ()) { continue; } - if (window.on_all_workspaces) { + if (window.on_all_workspaces || window == moving || window == grabbed_window) { // notifications use their own group and are always on top if (NotificationStack.is_notification (window)) { continue; @@ -2022,8 +1996,8 @@ namespace Gala { clutter_actor_reparent (actor, static_windows); actor.set_translation (-clone_offset_x, -clone_offset_y, 0); - // Don't fade docks they just stay where they are - if (window.window_type == DOCK) { + // Don't fade docks and moving/grabbed windows they just stay where they are + if (window.window_type == DOCK || window == moving || window == grabbed_window) { continue; }