@@ -51,13 +51,11 @@ public class Gala.BackgroundManager : Meta.BackgroundGroup, Gala.BackgroundManag
5151 }
5252
5353 private void swap_background_actor (bool animate ) requires (new_background_actor != null ) {
54- var old_background_actor = background_actor;
55- background_actor = new_background_actor;
56- new_background_actor = null ;
57-
5854 changed ();
5955
60- if (old_background_actor == null ) {
56+ if (background_actor == null ) {
57+ background_actor = new_background_actor;
58+ new_background_actor = null ;
6159 return ;
6260 }
6361
@@ -67,16 +65,17 @@ public class Gala.BackgroundManager : Meta.BackgroundGroup, Gala.BackgroundManag
6765 transition. set_to_value (0 );
6866 transition. duration = FADE_ANIMATION_TIME ;
6967 transition. progress_mode = Clutter . AnimationMode . EASE_OUT_QUAD ;
70- transition. remove_on_complete = true ;
71- transition. completed. connect (() = > {
72- old_background_actor. destroy ();
68+ transition. completed. connect ((_transition) = > {
69+ _transition. actor. destroy ();
7370 });
7471
75- old_background_actor . add_transition (" fade-out" , transition);
72+ background_actor . add_transition (" fade-out" , transition);
7673 } else {
77- old_background_actor . destroy ();
74+ background_actor . destroy ();
7875 }
7976
77+ background_actor = new_background_actor;
78+ new_background_actor = null ;
8079 }
8180
8281 private void update_background_actor (bool animate = true ) {
@@ -93,6 +92,13 @@ public class Gala.BackgroundManager : Meta.BackgroundGroup, Gala.BackgroundManag
9392
9493 if (background. is_loaded) {
9594 if (rounded_corners) {
95+ var monitor_geometry = display. get_monitor_geometry (monitor_index);
96+ var clip_bounds = Graphene . Rect () {
97+ origin = {0 , 0 },
98+ size = {monitor_geometry. width, monitor_geometry. height},
99+ };
100+
101+ new_content. set_rounded_clip_bounds (clip_bounds);
96102 new_content. rounded_clip_radius = Utils . scale_to_int (6 , display. get_monitor_scale (monitor_index));
97103 }
98104
@@ -106,6 +112,13 @@ public class Gala.BackgroundManager : Meta.BackgroundGroup, Gala.BackgroundManag
106112 background. set_data< ulong > (" background-loaded-handler" , 0 );
107113
108114 if (rounded_corners) {
115+ var monitor_geometry = display. get_monitor_geometry (monitor_index);
116+ var clip_bounds = Graphene . Rect () {
117+ origin = {0 , 0 },
118+ size = {monitor_geometry. width, monitor_geometry. height},
119+ };
120+
121+ new_content. set_rounded_clip_bounds (clip_bounds);
109122 new_content. rounded_clip_radius = Utils . scale_to_int (6 , display. get_monitor_scale (monitor_index));
110123 }
111124
0 commit comments