rvaiya / warpd

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

warpd works when launched from terminal but does not work when executed by sway #235

Closed max-p-log-p closed 1 year ago

max-p-log-p commented 1 year ago

The default keybindings suggested in the README and my own keybindings in the sway config file (~/.config/sway/config) cause a mouse cursor to show and then disappear immediately when the keybinding is used.

bindsym $mod+Shift+f exec /usr/local/bin/warpd ‐‐hint bindsym $mod+Shift+w exec /usr/local/bin/warpd ‐‐normal bindsym $mod+g exec /usr/local/bin/warpd ‐‐grid

warpd works when run from the terminal and when --oneshot is added to the command in the keybindings sway.log

max-p-log-p commented 1 year ago

New behavior: it runs but only a mouse cursor appears and is not controllable.

max-p-log-p commented 1 year ago

It blocks after wl_display_dispatch(wl.dpy); in src/platform/linux/wayland/screen.c

max-p-log-p commented 1 year ago

New behavior: getopt_long returns -1 even though argv and argc are set correctly, setting the correct mode_flag manually results in correct behavior.

max-p-log-p commented 1 year ago

Fixed: the -- characters in the config were utf-8, causing getopt_long to fail.