From ee44e08017db1e448144b11f10722f07fd215a8a Mon Sep 17 00:00:00 2001 From: Leonhard Kargl Date: Sun, 1 Sep 2024 15:25:09 +0200 Subject: [PATCH] PanelWindow: Only multiply by scale factor on wayland --- src/PanelWindow.vala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PanelWindow.vala b/src/PanelWindow.vala index 96b4442f..1dc194b8 100644 --- a/src/PanelWindow.vala +++ b/src/PanelWindow.vala @@ -100,7 +100,7 @@ public class Wingpanel.PanelWindow : Gtk.Window { // We just use our monitor because Gala makes sure we are always on the primary one var monitor_dimensions = get_display ().get_monitor_at_window (get_window ()).get_geometry (); - if (!Services.DisplayConfig.is_logical_layout ()) { + if (!Services.DisplayConfig.is_logical_layout () && Gdk.Display.get_default () is Gdk.Wayland.Display) { monitor_dimensions.width /= get_scale_factor (); monitor_dimensions.height /= get_scale_factor (); monitor_dimensions.x /= get_scale_factor (); @@ -159,7 +159,7 @@ public class Wingpanel.PanelWindow : Gtk.Window { } private int get_actual_height () { - if (!Services.DisplayConfig.is_logical_layout ()) { + if (!Services.DisplayConfig.is_logical_layout () && Gdk.Display.get_default () is Gdk.Wayland.Display) { return get_allocated_height () * get_scale_factor (); }