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 button events being sent when super is held #750

Merged
merged 2 commits into from
Aug 23, 2024

Conversation

JCapucho
Copy link
Contributor

Fixes #686

Previously when doing Super+{Left,Right} Click the compositor would still send the button event to the client, for left click this didn't cause issues most of the time but for right click this caused many issues because it would usually open a context menu which would cause the resize to stop immediately.

This PR fixes the issue by not sending any button events if the logo key is held.

@JCapucho JCapucho changed the title Fix right click resize passtrough Fix button events being sent when super is held Aug 19, 2024
Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

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

Looks mostly good to me, except for mismatched button events.

src/input/mod.rs Show resolved Hide resolved
@JCapucho JCapucho requested a review from Drakulix August 19, 2024 20:06
Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

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

Still not 100% right, but thanks for working on this!

src/input/mod.rs Outdated Show resolved Hide resolved
@JCapucho JCapucho force-pushed the fix-right-click-resize-passtrough branch from 8e93c0f to b4d942a Compare August 21, 2024 20:29
@JCapucho
Copy link
Contributor Author

I've switched the code to unset the grab instead of tracking the suppression status on the grab this greatly simplifies the code. I've also change the code so that the suppression is only done in the buttons handled by the compositor by pulling the match out.

I'm sure the code isn't good enough yet but just wanted to know if the overall structure is sound. And thank you for guiding me while implementing this :)

@JCapucho JCapucho requested a review from Drakulix August 21, 2024 20:33
Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

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

Looks mostly good to me now! Two small nitpicks, then this is ready for merge imo. Thanks again for working on this and putting up with the review process! 😅

src/input/mod.rs Outdated Show resolved Hide resolved
src/input/mod.rs Outdated Show resolved Hide resolved
@JCapucho JCapucho force-pushed the fix-right-click-resize-passtrough branch from b4d942a to 9b76a79 Compare August 22, 2024 15:39
@JCapucho JCapucho requested a review from Drakulix August 22, 2024 15:40
Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

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

Thanks!

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.

[BUG] Super + Right click passes right through to the application
2 participants