Silently run xinput due to warnings for (X)Wayland users #255
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I considered to go for WAYLAND_DIPSLAY envvar, but that's not exactly there if we're running as root, which is mostly needed for the daemon.
Also considered another ways which would not be reliable... At least not as much as xinput itself does, using Xlibs, which seemed overkill for this situation.
So I went with running it silently, so we know that won't hurt the functionality, it'd just not work.
I could also use xinput to first check if we were into a (x)wayland session, but that would only make twice the call which is not really needed.
Currently there's no standard way among the compositors to check if we're in a session (AFAIK).
Feel free to let me know if there's a better way.
Closes #205