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

touch: make EDGE_SWIPE_THRESHOLD configurable #2517

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

Conversation

arpio23
Copy link

@arpio23 arpio23 commented Nov 14, 2024

On mobile device with High-DPI screens and different scaling it would make sense to make that value configurable.

Copy link
Member

@ammen99 ammen99 left a comment

Choose a reason for hiding this comment

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

The idea LGTM, two small things to fix and I'll merge :)

<_short>Touchscreen edge swipe threshold</_short>
<_long>Change the threshold of the built-in edge swipe detection. Higher values mean that a bigger area on the edge is used to trigger the edge swipe.</_long>
<default>10</default>
<min>5</min>
Copy link
Member

Choose a reason for hiding this comment

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

I would make this 1 or so .. let the users have more freedom :)

@@ -427,24 +426,25 @@ static uint32_t find_swipe_edges(wf::touch::point_t point)
{
auto output = wf::get_core().seat->get_active_output();
auto geometry = output->get_layout_geometry();
wf::option_wrapper_t<int> edge_swipe_threshold{"input/edge_swipe_threshold"};
Copy link
Member

Choose a reason for hiding this comment

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

This will cause a lookup for the option every time the function is called. I would make it a static wf::option_wrapper_t<...> so that it loads only the first time the function is called :)

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, will fix up after new year.

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