Skip to content

Read wallpaper dimensions from the first frame - #15211

Open
sprajs wants to merge 1 commit into
omacom:quattrofrom
sprajs:fix/gif-background-dimensions
Open

sprajs wants to merge 1 commit into
omacom:quattrofrom
sprajs:fix/gif-background-dimensions

Conversation

@sprajs

@sprajs sprajs commented Oct 12, 2026

Copy link
Copy Markdown

Animated wallpapers can make the background size probe concatenate dimensions from multiple frames. A two-frame 20×10 GIF produces 20 1020 10; the shell reads that as 20×1020 and asks Qt's PreserveAspectCrop image to decode at that size. A bounded Qt reproduction expanded this 200-pixel image to 2040×1020 pixels. Larger wallpapers can therefore request enormous allocations, matching the failure mechanism in #15179.

Probe only frame zero, matching the still image the shell displays. The original wallpaper path remains the cache key and image source. The regression runs the actual probe, result parser and decode-size functions against real tiny animated/static GIF, PNG, JPEG and WebP fixtures, including a filename with spaces, brackets and Unicode.

Validation:

  • The new regression fails on unmodified 4c1b4cb3 with height 1020 instead of 10; all 15 assertions pass with the fix.
  • Existing background tests, Bash syntax, QML parse and git diff --check pass.
  • Actual background components verified in a private headless Labwc compositor: native size changes from 20×1020 to 20×10; before/after screenshots show the same first frame and are pixel-identical. No large allocation or host OOM was induced.
  • Headless ./test/all: CLI passed; 10 of 385 shell test files failed and 28 had skipped checks. All 10 failures reproduce on unchanged 4c1b4cb3 in the same headless environment (missing companion packaging checkout, existing migration/assertion failures, and a Lua fixture missing get_windows). No candidate-only failure was found.

Fixes #15179.

@greptile-apps

greptile-apps Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] This PR appears safe to merge; no actionable issues were found.

Summary

Reads wallpaper dimensions from frame zero so animated images cannot join several frames' dimensions into an incorrect decode size.

  • The wallpaper size probe reads dimensions from its first frame.

Reviews (1) · Last reviewed commit: "Read only the first frame when probing b..." · Reviewed by Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

quickshell OOM crash loop when setting animated GIF as desktop wallpaper

1 participant