JeanSchoeller / iio-hyprland

Listen iio-sensor-proxy and auto change Hyprland output orientation
GNU General Public License v3.0
47 stars 19 forks source link

Fixed touchdevice not autorotating after hyprland update #16

Closed MidHunterX closed 8 months ago

MidHunterX commented 8 months ago

Overview:

This pull request fixes a small bug where after updating to hyprland v0.37.x, the autorotation of touchinput is not working after rotating monitor device with iio-hyprland.

Problem:

After updating hyprland, the Touch Devices are not being rotated on my 2-in-1. Executing iio-hyprland shows the following output:

ok
config option <device:wacom-hid-5215-pen:transform> does not exist.
config option <device:wacom-hid-5215-finger:transform> does not exist.

Cause:

Now, hyprland's default behaviour is assigning the digitizer rotation value automatically when the monitor rotation changes. Thanks to this PR: https://github.com/hyprwm/Hyprland/pull/3544 Therefore Hyprland's config for changing touchdevice rotation is changed in v0.37.0 Now to rotate touchdevice, the config entry looks like this (from hyprland wiki v0.37.0):

input {
    touchdevice {
        transform = 1
    }
}

Changes Made:

Testing Done:

MidHunterX commented 8 months ago

Oops sorry, Didn't notice the other guy did the same thing and it created havoc for many ppl 😅