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

Pen input active while hovering #2756

Open
2 tasks done
cfalas opened this issue Jun 25, 2024 · 2 comments
Open
2 tasks done

Pen input active while hovering #2756

cfalas opened this issue Jun 25, 2024 · 2 comments

Comments

@cfalas
Copy link

cfalas commented Jun 25, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Is your issue described in the documentation?

  • I have read the documentation

Is your issue present in the latest beta/pre-release?

This issue is present in the latest pre-release

Describe the Bug

After the change from legacy input to inputtino, the pen input has changed behaviour:

  • Once I connect to the server, when I hover the screen the pointer moves (as expected)
  • Once I touch the screen with the pen, I can start drawing (as expected)
    • Note that the pressure sensitivity is ignored/not working at this stage
  • Once I am done with the stroke and the pen is lifted, the tool doesn't deactivate, and continues to draw while hovering the screen
  • If I leave and re-enter the hover area, the stroke simply jumps from the previous (hovered) position to the newest.

Video (not sure if it's very clear)

A simple fix (see commit on my fork 21484e5) appears to mostly solve this, but not entirely:

  • Always, once the screen is touched, the pressure is (as expected)
  • Sometimes, when the pen is lifted (but in hovering range), the pen doesn't release

e.g. trying to draw a dashed line results in something like this:

I can see some correlation between when it happens and pressure and/or tilt angle (i.e. when pressure is higher, it doesn't happen as much, and when pressure is low and tilt angle is close to the screen it happens most of the time)

Expected Behavior

When the pen is hovering, the pointer is moved without clicking anything.
When the pen touches the pointer acts as a pen in apps supporting pen input (e.g. Xournal++). As soon as the pen is lifted, the pen stops writing.

Additional Context

For testing, I am using moonlight-android on a Samsung S9 Ultra with the S pen.

Host Operating System

Linux

Operating System Version

Arch Linux, kernel 6.9.5

Architecture

64 bit

Sunshine commit or version

10666c0

Package

other (self built)

GPU Type

Intel

GPU Model

UHD 770

GPU Driver/Mesa Version

24.1.2

Capture Method

wlroots (Linux)

Config

adapter_name = /dev/dri/renderD128
output_name = 0
resolutions = [
    352x240,
    480x360,
    858x480,
    1280x720,
    1920x1080,
    2560x1080,
    3440x1440,
    1920x1200,
    3840x2160,
    3840x1600,
    2960x1848
]
channels = 2

Apps

No response

Relevant log output

N/A
@ABeltramo
Copy link
Contributor

Thanks for the detailed issue and PR, unfortunately I don't have the HW to test this, so I was just relying on the libinput unit tests and documentation. It might be worth to double-check what exactly Moonlight sends over the wire by enabling the debug logs in Sunshine; the client could just report the wrong values..

@cfalas
Copy link
Author

cfalas commented Jun 26, 2024

I already checked both client and sunshine logs before making the issue so I'm confident the issue is within sunshine.

It looks like the combination of 21484e5 and games-on-whales/inputtino#10 completely fix this. I'll test some more over the next few days and make a PR here as well.

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

No branches or pull requests

2 participants