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

swaybar: Implement further touch / tablet (pen) events #6109

Closed
Zocker1999NET opened this issue Mar 18, 2021 · 1 comment · Fixed by #6111
Closed

swaybar: Implement further touch / tablet (pen) events #6109

Zocker1999NET opened this issue Mar 18, 2021 · 1 comment · Fixed by #6111
Labels
enhancement New feature or incremental improvement

Comments

@Zocker1999NET
Copy link

I use sway / swaybar on a Thinkpad X1 Tablet Gen3 (supporting pen inputs). Sway can correctly accept touch & pen inputs and forward those to all applications appropriate. But I also use swaybar to implement a bar myself, which works quite well, but due to swaybar not forwarding events like swiping with a finger (will be forwarded as simple click), holding down with a finger (also simple click) and so on I cannot use those events for further actions. Also with the pen it is not possible to send something equivalent to a right click to swaybar (other applications seem to detect a button on my pen as "right click", but not swaybar).

It would be great if we could receive some of those events from swaybar to use in our status scripts.

My propose, which should hopefully easy to implement for already contributors:

  • long touch press -> right click
  • doubled touch press -> right click
  • button press on pen -> right click

This would be a great step forward for more touch/tablet support IMHO.

@Zocker1999NET Zocker1999NET added the enhancement New feature or incremental improvement label Mar 18, 2021
kennylevinsen added a commit to kennylevinsen/sway that referenced this issue Mar 18, 2021
Only wl_pointer.motion was used to update pointer position, which would
cause issues if the pointer was not moved prior to wl_pointer.button.

This also fixes touch input through wl_pointer emulation, which fires
wl_pointer.button immediately after wl_pointer.enter.

Copied from a similar fix made to swaynag.

Closes: swaywm#6109
@kennylevinsen
Copy link
Member

Try this: #6111

kennylevinsen added a commit that referenced this issue Mar 20, 2021
Only wl_pointer.motion was used to update pointer position, which would
cause issues if the pointer was not moved prior to wl_pointer.button.

This also fixes touch input through wl_pointer emulation, which fires
wl_pointer.button immediately after wl_pointer.enter.

Copied from a similar fix made to swaynag.

Closes: #6109
emersion pushed a commit to emersion/sway that referenced this issue Mar 24, 2021
Only wl_pointer.motion was used to update pointer position, which would
cause issues if the pointer was not moved prior to wl_pointer.button.

This also fixes touch input through wl_pointer emulation, which fires
wl_pointer.button immediately after wl_pointer.enter.

Copied from a similar fix made to swaynag.

Closes: swaywm#6109
(cherry picked from commit 6271bd0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or incremental improvement
Development

Successfully merging a pull request may close this issue.

2 participants