horriblename / hyprgrass

hyprland plugin for touch gestures
BSD 3-Clause "New" or "Revised" License
225 stars 7 forks source link

incorrect position mapping with multiple touch screens #126

Closed Arbel-arad closed 1 month ago

Arbel-arad commented 1 month ago

when grabbing a window (with a 3-finger longpress) if the window is on a secondary display it will get teleported to the main display at the same x/y location. i can still move it around in the mapped area and it follows the finger positions from screen 2 to screen 1.

grabbing windows on the primary screen works as intended.

horriblename commented 1 month ago

which commit? of hyprland and grass

Arbel-arad commented 1 month ago

hyprland 0.40.0-1 hyprgrass latest version from hyprpm

this issue has been going on since i first installed hyprgrass months ago but i assumed it was caused by an unrelated hyprland bug that was fixed a few days ago.

horriblename commented 1 month ago

I seem to have goofed up monitor detection, send me monitor + touch screen config

Arbel-arad commented 1 month ago

this is my hyprland monitor config

#-- Output -----------------------------------------------------
monitor = eDP-1,preferred,0x0,1.333333,bitdepth,10
monitor = DP-3,preferred,0x1622,1.333333,bitdepth,10
monitor = ,preferred,auto,1
#-- monitor=,preferred,auto,1,mirror,DP-1

and the input settings

#-- Input: Keyboard, Mouse, Touchpad, TouchScreen, Tablet-------
input {
    numlock_by_default = true
    repeat_rate = 25
    repeat_delay = 600
    sensitivity = 0.8
    accel_profile = adaptive
    force_no_accel = false
    left_handed = false
    scroll_method = 2fg
    scroll_button = 0
    natural_scroll = false
    follow_mouse = 1
    mouse_refocus = true
    float_switch_override_focus = 0
    touchpad {
        disable_while_typing = false
        natural_scroll = true
        scroll_factor = 1.0
        clickfinger_behavior = false
        tap-to-click = true
        drag_lock = true
        tap-and-drag = true
    }
}

device {
    name = elan9008:00-04f3:2c56
    transform = 0
    output = eDP-1
}
device {
    name = elan9009:00-04f3:2c23
    transform = 0
    output = DP-3
}

device {
    name = elan9008:00-04f3:2c56-stylus
    transform = 0
    output = eDP-1
}
device {
    name = elan9009:00-04f3:2c23-stylus
    transform = 0
    output = DP-3
}

input {
    kb_layout = us,il
    kb_options = grp:alt_shift_toggle
}
horriblename commented 1 month ago

you have two touchscreen devices?

Arbel-arad commented 1 month ago

yes, i have a zenbook pro duo with two touch + pen inputs.

horriblename commented 1 month ago

I'm surprised it works at all, is anything else broken? aside from workspace swipes. Do edge swipes work?

Arbel-arad commented 1 month ago

workspace swipes only work on screen 1 (no response on screen 2) edge swipes act the same as workspace swipes tap actions work as expected window dragging teleports the window to screen1 (as stated above)

looks like anything that would use position information is broken but taps that act on a window are fine

horriblename commented 1 month ago

feel free to reopen if not fixed

ForgotMyPasswd commented 1 month ago

This doesn't work for me. While I don't have a device with two touchscreens, I use regularly two displays often which requires me to offset my touchscreen display if I want to place the other display above my touchscreen's display. The plugin seems to still be treating the display as if it has an offset of 0x0 even when it doesn't, with the only fix being to enter and exit sleep.

Arbel-arad commented 1 month ago

i tested it, looks like nothing changed.

horriblename commented 1 month ago

let me know if it works

I wanna make a release but I wanna first make sure this bug dies here

Arbel-arad commented 1 month ago

i updated everything, looks like it's all working now!