From 63d06f8b9529d55d9aea5d60f0224a26c58be9fb Mon Sep 17 00:00:00 2001 From: Leonhard <106322251+leolost2605@users.noreply.github.com> Date: Tue, 12 Nov 2024 12:22:59 +0100 Subject: [PATCH] PanelWindow: Don't use custom size for positioning, correct y for bottom panels (#2108) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Stanisław <6031763+stsdc@users.noreply.github.com> Co-authored-by: Ryan Kornheisl --- src/ShellClients/PanelWindow.vala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ShellClients/PanelWindow.vala b/src/ShellClients/PanelWindow.vala index d20ba7a8..5351cbe5 100644 --- a/src/ShellClients/PanelWindow.vala +++ b/src/ShellClients/PanelWindow.vala @@ -69,6 +69,11 @@ public class Gala.PanelWindow : Object { if (height > 0) { window_rect.height = height; + + if (anchor == BOTTOM) { + var geom = wm.get_display ().get_monitor_geometry (window.get_monitor ()); + window_rect.y = geom.y + geom.height - height; + } } return window_rect; @@ -92,7 +97,7 @@ public class Gala.PanelWindow : Object { private void position_window () { var display = wm.get_display (); var monitor_geom = display.get_monitor_geometry (display.get_primary_monitor ()); - var window_rect = get_custom_window_rect (); + var window_rect = window.get_frame_rect (); switch (anchor) { case TOP: