From e1447b45d639444ba3696391fbb9d8a62dad0e13 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 28 Dec 2024 10:40:46 +0100 Subject: src/main-window.vala: Make set_struts() a method without parameters and move previous set_struts() to _set_struts() (private method now). --- src/main-window.vala | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main-window.vala b/src/main-window.vala index 370fa76..9535394 100644 --- a/src/main-window.vala +++ b/src/main-window.vala @@ -248,10 +248,16 @@ public class MainWindow : Gtk.Window resize (background.width, background.height); move (0, 0); move_to_monitor (primary_monitor); - set_struts (MenubarPositions.TOP, ArcticaGreeter.MENUBAR_HEIGHT); + set_struts (); } - public void set_struts (uint position, long menubar_size) + public void set_struts () + { + /* Substract the 5px shadow from the menubar height, so that indicators' menus render well */ + _set_struts (MenubarPositions.TOP, ArcticaGreeter.MENUBAR_HEIGHT); + } + + private void _set_struts (uint position, long menubar_size) { if (!get_realized()) { return; @@ -346,7 +352,7 @@ public class MainWindow : Gtk.Window debug ("MainWindow is %dx%d pixels", background.width, background.height); background.set_monitors (monitors); - set_struts (MenubarPositions.TOP, ArcticaGreeter.MENUBAR_HEIGHT); + set_struts (); if(do_resize) { -- cgit v1.2.3