Skip to content

Commit

Permalink
PanelWindow: Only multiply by scale factor on wayland
Browse files Browse the repository at this point in the history
  • Loading branch information
leolost2605 authored and tintou committed Sep 1, 2024
1 parent 150e582 commit feb5c84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PanelWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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 ();
Expand Down Expand Up @@ -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 ();
}

Expand Down

0 comments on commit feb5c84

Please sign in to comment.