BackgroundManager: Send changed signal early (#1968)

This commit is contained in:
Leo 2024-07-09 06:13:10 +09:00 committed by GitHub
parent e91d971055
commit 5c420862d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -49,13 +49,13 @@ public class Gala.BackgroundManager : Meta.BackgroundGroup, Gala.BackgroundManag
}
}
private void swap_background_actor (bool animate) {
return_if_fail (new_background_actor != null);
private void swap_background_actor (bool animate) requires (new_background_actor != null) {
var old_background_actor = background_actor;
background_actor = new_background_actor;
new_background_actor = null;
changed ();
if (old_background_actor == null) {
return;
}
@ -76,7 +76,6 @@ public class Gala.BackgroundManager : Meta.BackgroundGroup, Gala.BackgroundManag
old_background_actor.destroy ();
}
changed ();
}
private void update_background_actor (bool animate = true) {