Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong colors on Wayland [Hyprland] with XRGB Buffers #158

Open
eneoli opened this issue May 31, 2024 · 3 comments
Open

Wrong colors on Wayland [Hyprland] with XRGB Buffers #158

eneoli opened this issue May 31, 2024 · 3 comments
Assignees
Labels
bug Something isn't working Wayland Related to wayland

Comments

@eneoli
Copy link
Owner

eneoli commented May 31, 2024

What happened?

Taking a screnshot on Hyprland v0.40. turns blue colors into red colos and red colors into blue colors.

How can we reproduce the bug?

  1. Run flakeshot on wayland
  2. Take a screenshot

Display Protocol

Wayland

Which Linux Distro do you use?

Arch

How many monitors do you have and how are they orientated? If you can, please include images of your layout.

Tested on 1 laptop screen and two stationary monitors both in landscape

Relevant log output

No response

@eneoli eneoli added the bug Something isn't working label May 31, 2024
@eneoli eneoli self-assigned this May 31, 2024
@eneoli
Copy link
Owner Author

eneoli commented May 31, 2024

ok thats weird: the buffer type is said to be an Xrgb8888. But in fact it seems to be bgr(A|X?)8888?

@eneoli
Copy link
Owner Author

eneoli commented May 31, 2024

That does the trick (in src/backend/wayland/mod.rs)

Format::Xrgb8888 => {
            // switch r and b channel
            data.chunks_mut(4)
                .for_each(|chunk| {
                    (chunk[0], chunk[2]) = (chunk[2], chunk[0]);
                });
}

But why?

@eneoli eneoli changed the title Wrong colors on Wayland [Hyprlnd] with XRGB Buffers Wrong colors on Wayland [Hyprland] with XRGB Buffers May 31, 2024
@eneoli eneoli added the Wayland Related to wayland label May 31, 2024
@eneoli
Copy link
Owner Author

eneoli commented May 31, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Wayland Related to wayland
Projects
None yet
Development

No branches or pull requests

1 participant