Skip to content

Commit

Permalink
WindowManager/workspace switcher: Fix stacking order of moving window (
Browse files Browse the repository at this point in the history
…#2156)

Co-authored-by: Leo <[email protected]>
  • Loading branch information
leolost2605 and lenemter authored Jan 4, 2025
1 parent 0991de2 commit a648353
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 30 deletions.
1 change: 1 addition & 0 deletions data/gala.metainfo.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<issue url="https://github.com/elementary/gala/issues/2088">Invisible window clones</issue>
<issue url="https://github.com/elementary/gala/issues/2113">gnome-session-x11-services-ready.target isn't started on Wayland session</issue>
<issue url="https://github.com/elementary/gala/issues/2131">Unthemed cursor style and glitchy menus on some applications</issue>
<issue url="https://github.com/elementary/gala/issues/2154">Windows do not display correctly after moving between workspaces</issue>
<issue url="https://github.com/elementary/gala/issues/2159">Crash when moving windows between workspaces and using gestures to switch</issue>
<issue url="https://github.com/elementary/gala/issues/2169">Text UI based Scaling: Tiny Titlebars in XWayland Apps</issue>
<issue url="https://github.com/elementary/gala/issues/2171">PiP dragging doesn't start until after mouse is released</issue>
Expand Down
34 changes: 4 additions & 30 deletions src/WindowManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -1961,29 +1961,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;

Expand All @@ -1999,15 +1977,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;
Expand All @@ -2019,8 +1993,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;
}

Expand Down

0 comments on commit a648353

Please sign in to comment.