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

Synchronize highlight position between outputs #292

Merged
merged 1 commit into from
Apr 2, 2023

Conversation

mstoeckl
Copy link
Contributor

@mstoeckl mstoeckl commented Apr 2, 2023

This change makes Swaylock look slightly nicer, by ensuring that highlight positions are updated once per key stroke, and not once per time a frame is drawn -- which could make highlight positions change differently depending on the number of active monitors.

For example, with two outputs, before this change, the highlight position would change independently for each output, and often by small amounts due to it being updated twice / rotated by two approximate half turns:
bad.webm
And after this change:
good.webm

This change has the additional benefit of ensuring that the position
of the highlight only changes in reaction to a letter key or
backspace being pressed, and not when the compositor sends a new
configure event or the output needs to be redrawn for some other
reason.
Copy link
Member

@kennylevinsen kennylevinsen left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@kennylevinsen kennylevinsen merged commit 75e837c into swaywm:master Apr 2, 2023
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.

2 participants