Skip to content

Commit

Permalink
Merge branch 'main' into leolost/window-clone-allocat-window-icon
Browse files Browse the repository at this point in the history
  • Loading branch information
lenemter authored Dec 12, 2024
2 parents cdeaff4 + 74f91ae commit bddf55a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/ShellClients/HideTracker.vala
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public class Gala.HideTracker : Object {
continue;
}

if (!panel.window.get_frame_rect ().overlap (window.get_frame_rect ())) {
if (!panel.get_custom_window_rect ().overlap (window.get_frame_rect ())) {
continue;
}

Expand Down
18 changes: 10 additions & 8 deletions src/WindowManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ namespace Gala {
#else
private Meta.Rectangle old_rect_size_change;
#endif
private Clutter.Actor latest_window_snapshot;
private Clutter.Actor? latest_window_snapshot;

private GLib.Settings behavior_settings;
private GLib.Settings new_behavior_settings;
Expand Down Expand Up @@ -1402,13 +1402,13 @@ namespace Gala {
latest_window_snapshot.restore_easing_state ();

ulong maximize_old_handler_id = 0UL;
maximize_old_handler_id = latest_window_snapshot.transitions_completed.connect (() => {
latest_window_snapshot.disconnect (maximize_old_handler_id);
latest_window_snapshot.destroy ();
maximize_old_handler_id = latest_window_snapshot.transitions_completed.connect ((snapshot) => {
snapshot.disconnect (maximize_old_handler_id);
snapshot.destroy ();
actor.set_translation (0.0f, 0.0f, 0.0f);
});

latest_window_snapshot.restore_easing_state ();
latest_window_snapshot = null;

actor.set_pivot_point (0.0f, 0.0f);
actor.set_translation (old_rect_size_change.x - ex, old_rect_size_change.y - ey, 0.0f);
Expand Down Expand Up @@ -1775,11 +1775,13 @@ namespace Gala {
latest_window_snapshot.restore_easing_state ();

ulong unmaximize_old_handler_id = 0UL;
unmaximize_old_handler_id = latest_window_snapshot.transitions_completed.connect (() => {
latest_window_snapshot.disconnect (unmaximize_old_handler_id);
latest_window_snapshot.destroy ();
unmaximize_old_handler_id = latest_window_snapshot.transitions_completed.connect ((snapshot) => {
snapshot.disconnect (unmaximize_old_handler_id);
snapshot.destroy ();
});

latest_window_snapshot = null;

actor.set_pivot_point (0.0f, 0.0f);
actor.set_position (ex, ey);
actor.set_translation (-ex + offset_x * (1.0f / scale_x - 1.0f) + old_rect_size_change.x, -ey + offset_y * (1.0f / scale_y - 1.0f) + old_rect_size_change.y, 0.0f);
Expand Down

0 comments on commit bddf55a

Please sign in to comment.