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

implement wl_output_transform #224

Merged
merged 4 commits into from
Dec 19, 2024
Merged

implement wl_output_transform #224

merged 4 commits into from
Dec 19, 2024

Conversation

caffeine01
Copy link
Contributor

very simple change; ready to be merged whenever.

2024-12-17.00-57-07.mp4

@caffeine01
Copy link
Contributor Author

@vaxerski should be fixd

src/helpers/Monitor.cpp Outdated Show resolved Hide resolved
@caffeine01
Copy link
Contributor Author

@vaxerski this should be fine now

@caffeine01
Copy link
Contributor Author

caffeine01 commented Dec 19, 2024

In essence, when a geometry event is recieved, it compares the new transforms' and old transforms' parity with a bitwise XOR operation (yay a whole extra 1 picosecond of performance), meaning if and only if ONE of the transforms has a parity of 1 (because only odd transforms 1,3,5,7 describe rotations of 90 or 270 degrees) then a size swap needs to occur (i feel so smart !).
Furthermore, when a mode is set it checks the state of the transform and applies a size swap if it has a parity of 1.

From what I can tell, this SHOULD handle all cases and combinations of mode and transform events.

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

convoluted solution but ok

@caffeine01
Copy link
Contributor Author

you can appreciate the elegance tho right? im proud at least

@vaxerski vaxerski merged commit f15e678 into hyprwm:main Dec 19, 2024
1 check passed
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.

2 participants