-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
binds: drag_threshold for click/drag isolation #9839
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
Conversation
4ac0cef
to
c161848
Compare
ping me tomorrow pls |
ping @vaxerski, a day late but I'm not at my desk much on weekends. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks pretty ok to me. Needs a wiki mr
@vaxerski hyprwm/hyprland-wiki#1023 Feedback? |
hm. Now that I look at it, wouldn't c and g be better as extensions to m?
and error out if it's not |
I originally though about including the Anyway glad you picked this up again. |
As Dregu points out, the drag_threshold is measured for c, g, and m bind flags. c and g are only applicable to non-m binds since drag_threshold is fundamentally part of bindm. Are you looking to have a bindm option to toggle off drag_threshold? |
I've pushed a wiki change with hopefully a clearer explanation/description. |
yes, that's clearer. Thanks |
ugh. this reverts a few commits |
that's wrong since you are moving the same affected codepaths around, #9658 (comment) vaxry was wrong here as well #9780 should have been superseded by #9658 |
Oh no exactly the thing I said would happen happened /s |
This code was abandoned in #9658 and I'm picking it back up.
New features
Threshold handling is slightly different whether there is a bindm on the same button or not:
These are mutually exclusive.
Simple example that adds more window handling to the same 2 buttons:
binds {
drag_threshold = 20
}
bindm = SUPER, mouse:272, movewindow
bindc = SUPER, mouse:272, togglefloating
bindm = SUPER, mouse:273, resizewindow
bindc = SUPER, mouse:273, fullscreen
Thoughts
The default threshold = 0 should work like current default behavior, i.e. windows are grabbed immediately on mousedown. With threshold > 0 yoinking happens later on mousemove.
This probably obsoletes #8143 and fixes #9631.
Is it ready for merging: