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

Allow disabling tap-and-drag #1107

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexdavid
Copy link

Similar to #1088, this adds a new touchpad drag configuration option that configures tap-and-drag behavior.

Currently tap-and-drag is always enabled when the tap setting is enabled, but other compositors allow setting this separately.

Similar to YaLTeR#1088, this adds a new
touchpad `drag` configuration option that configures tap-and-drag
behavior.

Currently tap-and-drag is always enabled when the `tap` setting is
enabled, but other compositors allow setting this separately.
@alexdavid alexdavid force-pushed the allow-disable-tap-and-drag branch from f772d6e to 9b0ee40 Compare February 9, 2025 19:48
@YaLTeR
Copy link
Owner

YaLTeR commented Feb 11, 2025

Hm, so does this mean that when this PR is merged, everyone will suddenly have tap-and-drag disabled? That's not good.

If tap-and-drag is on by default, then I guess it makes more sense to have an inverse no-drag flag? Or an explicit drag false where unset fetches and uses the default libinput value?

@alexdavid
Copy link
Author

alexdavid commented Feb 12, 2025

Yeah good point. Would you prefer to go with a drag option that is an Option<bool> and only make the call to config_tap_set_drag_enabled if set?

@YaLTeR
Copy link
Owner

YaLTeR commented Feb 12, 2025

It needs to reset to default value if you comment it out while running niri.

@alexdavid
Copy link
Author

alexdavid commented Feb 12, 2025

Ah right, I suppose we could go with

device.config_tap_set_drag_enabled(c.drag.unwrap_or(true))

But let me know if you prefer a no-drag option, or fetching the default value from libinput (is this default configurable somewhere in libinput?)

@YaLTeR
Copy link
Owner

YaLTeR commented Feb 12, 2025

As far as I can tell from libinput code, tap-and-drag is always enabled by default. So I guess we could go with no-drag. Though, that reads a bit weird, so maybe it's better to go with drag: Option<bool>, at which point we might as well fetch the default from libinput when it's unset.

@alexdavid
Copy link
Author

That makes sense, I'll look into fetching the default from libinput this weekend. 🙂

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