Skip to content

Commit

Permalink
Use transitions_completed
Browse files Browse the repository at this point in the history
  • Loading branch information
leolost2605 committed Dec 13, 2024
1 parent bddf55a commit 9d9593d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Widgets/WindowClone.vala
Original file line number Diff line number Diff line change
Expand Up @@ -703,10 +703,15 @@ public class Gala.WindowClone : Clutter.Actor {

display.set_cursor (Meta.Cursor.DEFAULT);

Timeout.add (duration, () => {
if (duration > 0) {
ulong handler = 0;
handler = clone.transitions_completed.connect (() => {
prev_parent.set_child_at_index (this, prev_index); // Set the correct index so that correct stacking order is kept
clone.disconnect (handler);
});
} else {
prev_parent.set_child_at_index (this, prev_index); // Set the correct index so that correct stacking order is kept
return Source.REMOVE;
});
}
}

private static bool is_close_button_on_left () {
Expand Down

0 comments on commit 9d9593d

Please sign in to comment.