rvaiya / warpd

A modal keyboard-driven virtual pointer
MIT License
2.85k stars 126 forks source link

Cursor moving towards bottom right corner when repeatedly triggerred on hyprland #265

Open glyh opened 10 months ago

glyh commented 10 months ago

How to reproduce

  1. Install wayland, hyprland-git and warpd-git on arch linux
  2. start hyprland and repeatedly trigger warpd

Screenshot

https://github.com/rvaiya/warpd/assets/12870742/7da8e07c-c614-4fe9-a205-12d4315dab56

glyh commented 10 months ago

Also opened as https://github.com/hyprwm/Hyprland/issues/2993

glyh commented 8 months ago

UserSv4 pointed out that it may caused by rvaiya/warpd@01650ea/src/platform/linux/wayland/screen.c#L97

ref: https://github.com/hyprwm/Hyprland/issues/2993#issuecomment-1794686124

UserSv4 commented 5 months ago

@rvaiya as far as I understand https://github.com/rvaiya/warpd/blob/01650eabf70846deed057a77ada3c0bbb6d97d6e/src/platform/linux/wayland/screen.c#L97 isn't even needed for --hint --oneshot and to get the cursor position on Hyprland it's possible to use hyprctl cursorpos or sockets (see https://wiki.hyprland.org/Configuring/Using-hyprctl/). I don't think I'd be able to make a PR for this, but if you do intend to fix this issue, it should be possible with hyprctl cursorpos