xwayland: Add option to additionally eavesdrop on mouse buttons
Adds an option to additionally eavesdrop on mouse buttons, with a separate checkbox. It is enabled only when eavesdropping occurs, and can be used with any eavesdropping mode, without security implications.
An overload is added for PointerInterface::sendButton
, matching the behaviour of KeyboardInterface::sendKey
, to use a specific client (xwaylandClient).
Example use case: Using mouse button as push-to-talk key in Discord
I recommend further refactoring in pointer.cpp: the function PointerInterface::sendButton(quint32 button, PointerButtonState state, quint32 serial)
could be changed to not take a serial but to get the next serial, matching the versions of KeyboardInterface::sendKey
.
Edited by Oliver Beard