hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
19.61k stars 827 forks source link

Add option to map tablets across monitors using input:tablet:output=ALL in hyprland.conf #6889

Open Da-Boom opened 2 months ago

Da-Boom commented 2 months ago

Description

In relation to The changes made in #5902 and the bug at #6023

Its well known that Hyprland gives the option input:tablet:output= which allows me to specify a monitor to bind a tablet to. This is great for regular drawing tablets, as it simplifies things. By default, when not specified it maps to whichever monitor the cursor is currently on.

But there's a situation where this setup not great. (not counting the obvious oddly shaped tablets and monitors like a 16:10 tablet on a 16:9 display, which has obvious implications, but can also be manipulated with other input settings for tablets.)

when i have an abnormal pointing devices that doesn't follow these conventions. like in the case of wlx-overlay-s made by galister (https://github.com/galister/wlx-overlay-s) or say if someone were to try using a wii remote as a pointing device across monitors - (cwiid is a thing)

wlx-overlay-s designed to work with wlroots based compositors. It allows using desktop portals to preview the screens onto surfaces on a HMD (head mounted display) it simulates a pointer device using uinput and maps using the regular tablet surface - which is defined by input:tablet:output= in hyprland.

This leads to a problem. Given that it expects to get the entire desktop canvass for BOTH monitors, as that's what most other compositors do. it ends up inadvertently mapping one monitor across both the virtual screens in vr.

what i want in this feature request is the simple ability to supply ALL to the input:tablet:output= setting, allowing me to map the virtual device across all existing separate displays at the same time.

I am willing to test this as i have my monado setup with galisters' patches functioning nicely, a HMD and i already have wlx-overlay-s installed.

CobaltSpace commented 3 weeks ago

I was doing some testing. Using my drawing tablet, I tested the following:

input:tablet {
  output = $top_left_output
  region_size = $layout_width, $layout_height
}

This worked for my tablet, but when I launched wlx-overlay-s, it was still broken. I then tried

device {
  name = wlxoverlay-s-keyboard-mouse-hybrid-thing-1
  output = $top_left_output
  region_size = $layout_width, $layout_height
}

but this did not work either. So part of the issue is that while wlx-overlay-s acts like a tablet, if you run hyprctl devices, it shows up under mouse and under keyboard.

In conclusion, input:tablet:output=ALL probably wouldn't fix wlx-overlay-s unless something lower level is addressed.

This was tested on hyprland v0.41.2 with SteamVR & wlx-overlay-s v0.4.4

I wanted to try v0.42 or -git, but Xwayland would crash when plugging in the headset (#6949), so stuck on v0.41.2 for now.