From ad5033af7764f0023fabf4231a0fb3ae48329d07 Mon Sep 17 00:00:00 2001 From: MakeYourSoftBetter Date: Mon, 13 Jul 2026 22:51:45 +0500 Subject: [PATCH] Fixed a bug with blurred images in wallpaper https://github.com/WayfireWM/wf-shell/issues/499 Fix precision loss in wallpaper scaling calculations. GL_LINEAR filtering is kept unchanged. --- src/util/background-gl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/background-gl.cpp b/src/util/background-gl.cpp index acaef213f..5d5aeb12a 100644 --- a/src/util/background-gl.cpp +++ b/src/util/background-gl.cpp @@ -163,8 +163,8 @@ void BackgroundImage::generate_adjustments(int width, int height) adjustments->scale_y = 1.0; } else if (!fill_and_crop_string.compare(fill_type)) { - auto width_difference = screen_width - source_width; - auto height_difference = screen_height - source_height; + double width_difference = screen_width - source_width; + double height_difference = screen_height - source_height; if (width_difference > height_difference) { adjustments->scale_x = 1.0; @@ -182,8 +182,8 @@ void BackgroundImage::generate_adjustments(int width, int height) } } else /* "preserve_aspect" */ { - auto width_difference = screen_width / source_width; - auto height_difference = screen_height / source_height; + double width_difference = screen_width / source_width; + double height_difference = screen_height / source_height; if (width_difference > height_difference) { adjustments->scale_x = (screen_width / screen_height) * (source_height / source_width);