Repository navigation
Conversation
Hyprland 0.56+ delivers screencopy buffers in pre-transform (physical) orientation, and the compositor applies the output transform when displaying layer surfaces. The existing rendering code assumed the screenBuffer matched the logical layer surface dimensions, which breaks on portrait/rotated monitors — the zoom preview, color sampling, and picked color are all incorrect. - Track wl_output_transform via the output geometry event so renderSurface can map between physical screenBuffer coords and logical PBUFFER coords. - Add rotation-aware cairo pattern matrices in renderSurface() for both the active and inactive branches, supporting TR=1 (90° CW) and TR=3 (270° CW). - Add rotation-aware coordinate mapping for CLICKPOSBUF (zoom circle source position) and outputColor() (final color sample position). - Fix the circle radius calculation which previously used integer division instead of properly scaling the radius. - Fix sendFrame() which toggled lastBuffer before using it, causing the wrong buffer to be attached. lastBuffer is now set by renderSurface() before calling sendFrame(). - Use CAIRO_OPERATOR_SOURCE for the initial buffer clear in renderSurface(). The default OVER operator is a no-op when filling with transparent, leaving stale content from previous frames visible.
Member
|
can be closed since #168 is basically the proper way |
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.
Hyprland 0.56+ changed screencopy buffers here hyprwm/Hyprland#15714
The old approach of rotating the buffer in initSCFrame() via cairo transforms no longer works correctly the compositor applies the output transform when displaying layer surfaces, so rotating the buffer causes double-transformation on portrait or rotated monitors
Changes:
Tested locally, previously rotated monitors were goofed up, this fixes that, didn't see any regressions
I also bumped the patch version up one because I figured since this is a notable change it should change /shrug