Repository navigation
background: don't rotate screencopy frames that are already transformed - #1093
Closed
eggfriedrice24 wants to merge 1 commit into
Closed
eggfriedrice24 wants to merge 1 commit into
eggfriedrice24 wants to merge 1 commit into
Conversation
Author
|
closing this one, pushed by opus 5.5 before reading the ai policy, then discovered the issue for this already exists. super annoying, hope it gets fixed soon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Hyprland 0.57,
path = screenshotshows the desktop rotated 90° (sideways) on a rotated output (transform = 1), and on unlock the fade-out shows the sideways image before the desktop comes back.Cause
Hyprland's new screenshare code hands out zwlr_screencopy frames already in the output's transformed orientation. For a 2560x1440 output with
transform = 1, hyprlock logs:CBackgroundthen rotates the frame again byinvertTransform(pOutput->transform), so it ends up sideways. (grim, which uses ext-image-copy-capture, captures the same output correctly.)Fix
In
renderToFB, skip the 90/270 rotation when the frame's orientation already matches the viewport's. Compositors that still send untransformed frames (2560x1440 here) are unaffected, as the frame then doesn't match the portrait viewport and is rotated as before.Limitation: 180° and flipped transforms can't be detected from the size alone. The full fix is probably on the Hyprland side (wlr-screencopy has no transform event, so frames should stay untransformed) or for hyprlock to use ext-image-copy-capture, which reports the transform.
Tested
Hyprland 0.57.0, DP-1 2560x1440 landscape + HDMI-A-1 2560x1440
transform = 1,background { path = screenshot; blur_passes = 3 }: the portrait monitor is now upright while locked and on unlock; the landscape monitor is unchanged.Related
Root cause reported in Hyprland: hyprwm/Hyprland#16802