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 empty selection when user doesn't move their cursor #59

Merged
merged 2 commits into from
Aug 3, 2020

Conversation

rpigott
Copy link
Contributor

@rpigott rpigott commented Jul 31, 2020

Slurp has this strange behavior where you start slurp and the surface is immediately fullscreen, but if your cursor is already positioned in the selection area (when you provide your own boxes) it doesn't highlight them. Worse, if you click within a selection area without moving your cursor it doesn't output the selection area you clicked on!

This PR changes that so the selection is updated on pointer enter as well as motion, allowing a selection to be immediately active when slurp starts. The first commit doesn't change anything, just rearranges some functions in main so I can use them without declaring them elsewhere. The second function does all the changes, by moving some of the motion code into seat_update_selection and calling it in handle_enter as well. PTAL.

Copy link
Owner

@emersion emersion 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!

Splitting the changes into two commits definitely made the review easier :)

@emersion emersion merged commit 24d30b7 into emersion:master Aug 3, 2020
@rpigott rpigott deleted the pointer_enter branch August 3, 2020 19:49
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