Skip to content

fix(wayland): normalize shm pixel formats to RGBA in all capture paths#15

Merged
vremyavnikuda merged 1 commit intomasterfrom
v0.1.6
Mar 4, 2026
Merged

fix(wayland): normalize shm pixel formats to RGBA in all capture paths#15
vremyavnikuda merged 1 commit intomasterfrom
v0.1.6

Conversation

@vremyavnikuda
Copy link
Copy Markdown
Collaborator

[0.1.6] 2026-03-04

Close #14

Fixed

  • Incorrect color channels with wl_shm::Argb8888: Fixed red/blue channel swap in screenshots on setups where screencopy reports Argb8888 (e.g. AMD/Hyprland) (thx Windblows2000) by converting BGRA memory layout to crate-level RGBA..

Changed

  • Unified shm format conversion: Centralized wl_shmRGBA byte conversion in a single internal helper and reused it in both single-output and multi-output capture paths to keep behavior consistent.
  • Format handling parity: Aligned default format fallback behavior between single and multi-output capture paths.

- correct red/blue channel swap when compositor reports `Argb8888`
- centralize `wl_shm` 32-bit format conversion in one internal path
- align default shm format fallback behavior between single and multi-output capture
@vremyavnikuda vremyavnikuda self-assigned this Mar 4, 2026
@vremyavnikuda vremyavnikuda added the bug Something isn't working label Mar 4, 2026
@vremyavnikuda vremyavnikuda merged commit 14819d8 into master Mar 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect color channel swap (BGR instead of RGB) on AMD/Hyprland

1 participant