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

Wayland with dual screens causes input to be relative to both monitors #229

Open
dolfandringa opened this issue Jun 26, 2023 · 3 comments
Open

Comments

@dolfandringa
Copy link

Hey all, I love weylus. Its really cool. But I have an issue with Wayland and Dual Monitor setup. I can totally choose to share a specific screen or window, but the input coordinates that are being sent (to pipewire) seem to be relative to both monitors. So if I share my left monitor (or a specific window that is full screen on the left monitor), and draw on the right edge of the tablet, the pointer actually moves to the right edge of my right monitor, not the right edge of my left monitor. And the middle of the tablet, actually ends up as the right edge of the left monitor. This problem doesn't seem to happen in X11.

@nfoert
Copy link

nfoert commented Sep 24, 2023

I'm experiencing this issue as well. Disabling the Wayland checkbox and selecting the option for my monitor under Capture on the iPad seemed to fix it for me.
I'm running Ubuntu 22.04 LTS.

@dolfandringa
Copy link
Author

Unfortunately for me showing a specific monitor turns the video black. So the input works correctly at that point, but I have no video on my tablet, making it really hard to really draw at the right location.

@H-M-H
Copy link
Owner

H-M-H commented Sep 26, 2024

Thanks for the report! Unfortunately this is a hard problem to solve, the reason being the way the Wayland protocol is designed. For more details see: #3 (comment)

Simply put, Wayland does not provide the coordinates of the selected window/screen. That's why Weylus can not map the emulated input to the correct window/screen and always maps the input to all screens. Another option is to use the RemoteDesktop Portal. Unfortunately it lacks some features, like pressure sensitivity. That's why I have not yet bothered to implement it for Weylus.

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

3 participants