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

Fix inverted transforms #4996

Merged
merged 3 commits into from
Feb 17, 2020
Merged

Fix inverted transforms #4996

merged 3 commits into from
Feb 17, 2020

Conversation

emersion
Copy link
Member

This patch makes it so users that have configured their screen with a
transform don't have to update their config after the wlroots breaking
change.

References: swaywm/wlroots#2023


// Sway uses clockwise transforms, while WL_OUTPUT_TRANSFORM_* describe
// anti-clockwise transforms
transform = wlr_output_transform_invert(transform);
Copy link
Contributor

@mstoeckl mstoeckl Feb 10, 2020

Choose a reason for hiding this comment

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

While wlr_output_transform_invert correctly fixes the rotation direction for pure rotations, the inverse transformation of WL_OUTPUT_TRANSFORM_FLIPPED_90 is ..._FLIPPED_90, not the value ...._FLIPPED_270 that the wlroots patch changing rotation directions swapped it with.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, right. I guess the clockwise/anticlockwise handling needs to be fixed as well.

This wouldn't have any effect if the transform was flipped.
This patch makes it so users that have configured their screen with a
transform don't have to update their config after the wlroots breaking
change.

References: swaywm/wlroots#2023
@emersion
Copy link
Member Author

Updated, also added a note in the docs.

@ddevault
Copy link
Contributor

Thanks!

@ddevault ddevault merged commit f96dbf7 into swaywm:master Feb 17, 2020
Xyene added a commit to Xyene/sway that referenced this pull request May 28, 2020
After swaywm/wlroots#2023, swaywm#4996 inverted config inputs to
`transform`. For consistency, we should also communicate inverted
transformations via IPC.

Closes swaywm#5356.
Xyene added a commit to Xyene/sway that referenced this pull request May 28, 2020
After swaywm/wlroots#2023, swaywm#4996 inverted configuration transformations.
For consistency, we should undo (double-apply) the inversion when
communicating via IPC.

Closes swaywm#5356.
Xyene added a commit to Xyene/sway that referenced this pull request May 28, 2020
After swaywm/wlroots#2023, swaywm#4996 inverted configuration transformations.
For consistency, we should undo (double-apply) the inversion when
communicating via IPC.

Closes swaywm#5356.
emersion pushed a commit that referenced this pull request May 28, 2020
After swaywm/wlroots#2023, #4996 inverted configuration transformations.
For consistency, we should undo (double-apply) the inversion when
communicating via IPC.

Closes #5356.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants