@@ -13,6 +13,7 @@ public class Gala.BackgroundManager : Meta.BackgroundGroup, Gala.BackgroundManag
13
13
public WindowManager wm { get ; construct; }
14
14
public int monitor_index { get ; construct; }
15
15
public bool control_position { get ; construct; }
16
+ public bool rounded_corners { get ; construct; }
16
17
public Meta . BackgroundActor newest_background_actor {
17
18
get {
18
19
return (new_background_actor != null ) ? new_background_actor : background_actor;
@@ -23,8 +24,8 @@ public class Gala.BackgroundManager : Meta.BackgroundGroup, Gala.BackgroundManag
23
24
private Meta . BackgroundActor ? background_actor;
24
25
private Meta . BackgroundActor ? new_background_actor = null ;
25
26
26
- public BackgroundManager (WindowManager wm , int monitor_index , bool control_position = true ) {
27
- Object (wm: wm, monitor_index: monitor_index, control_position: control_position);
27
+ public BackgroundManager (WindowManager wm , int monitor_index , bool control_position = true , bool rounded_corners = true ) {
28
+ Object (wm: wm, monitor_index: monitor_index, control_position: control_position, rounded_corners : rounded_corners );
28
29
}
29
30
30
31
construct {
@@ -91,7 +92,10 @@ public class Gala.BackgroundManager : Meta.BackgroundGroup, Gala.BackgroundManag
91
92
var background = new_content. background. get_data< unowned Background > (" delegate" );
92
93
93
94
if (background. is_loaded) {
94
- new_content. rounded_clip_radius = Utils . scale_to_int (6 , wm. get_display (). get_monitor_scale (monitor_index));
95
+ if (rounded_corners) {
96
+ new_content. rounded_clip_radius = Utils . scale_to_int (6 , wm. get_display (). get_monitor_scale (monitor_index));
97
+ }
98
+
95
99
swap_background_actor (animate);
96
100
return ;
97
101
}
@@ -101,8 +105,11 @@ public class Gala.BackgroundManager : Meta.BackgroundGroup, Gala.BackgroundManag
101
105
background. disconnect (handler);
102
106
background. set_data< ulong > (" background-loaded-handler" , 0 );
103
107
108
+ if (rounded_corners) {
109
+ new_content. rounded_clip_radius = Utils . scale_to_int (6 , wm. get_display (). get_monitor_scale (monitor_index));
110
+ }
111
+
104
112
swap_background_actor (animate);
105
- new_content. rounded_clip_radius = Utils . scale_to_int (6 , wm. get_display (). get_monitor_scale (monitor_index));
106
113
});
107
114
background. set_data< ulong > (" background-loaded-handler" , handler);
108
115
}
0 commit comments