@@ -18,6 +18,7 @@ public class Dock.MainWindow : Gtk.ApplicationWindow {
1818
1919 // Matches top margin in Launcher.css
2020 private const int TOP_MARGIN = 64 ;
21+ private const int BORDER_RADIUS = 9 ;
2122
2223 private Settings transparency_settings;
2324 private static Settings settings = new Settings (" io.elementary.dock" );
@@ -28,6 +29,8 @@ public class Dock.MainWindow : Gtk.ApplicationWindow {
2829 private Gtk . Box main_box;
2930
3031 private WindowDragManager window_drag_manager;
32+ private BottomMargin bottom_margin;
33+ private bool initialized_blur = false ;
3134
3235 class construct {
3336 set_css_name ("dock -window ");
@@ -50,9 +53,11 @@ public class Dock.MainWindow : Gtk.ApplicationWindow {
5053 size_group. add_widget (overlay. child);
5154 size_group. add_widget (launcher_manager);
5255
56+ bottom_margin = new BottomMargin ();
57+
5358 main_box = new Gtk .Box (VERTICAL , 0 );
5459 main_box. append (overlay);
55- main_box. append (new BottomMargin () );
60+ main_box. append (bottom_margin );
5661 child = main_box;
5762
5863 remove_css_class (" background" );
@@ -131,6 +136,21 @@ public class Dock.MainWindow : Gtk.ApplicationWindow {
131136 item_manager_width,
132137 surface. height - top_margin
133138 }));
139+
140+ if (initialized_blur) {
141+ return ;
142+ }
143+
144+ Graphene . Rect bounds;
145+ bottom_margin. compute_bounds (bottom_margin, out bounds);
146+
147+ initialized_blur = true ;
148+
149+ if (panel != null ) {
150+ panel. add_blur (0 , 0 , 0 , (int ) bounds. get_height (), BORDER_RADIUS );
151+ } else {
152+ update_panel_x11 ();
153+ }
134154 });
135155
136156 registry_listener. global = registry_handle_global;
@@ -162,6 +182,12 @@ public class Dock.MainWindow : Gtk.ApplicationWindow {
162182
163183 var value = " anchor=8:hide-mode=%d :restore-previous-region=1:visible-in-multitasking-view=1" . printf (settings. get_enum (" autohide-mode" ));
164184
185+ if (initialized_blur) {
186+ Graphene . Rect bounds;
187+ bottom_margin. compute_bounds (bottom_margin, out bounds);
188+ value + = " :blur=0,0,0,%d ,%d " . printf ((int ) bounds. get_height (), BORDER_RADIUS );
189+ }
190+
165191 xdisplay. change_property (window, prop, X . XA_STRING , 8 , 0 , (uchar[]) value , value . length);
166192 }
167193 }
0 commit comments