-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: X11 local input #841
base: master
Are you sure you want to change the base?
Enhancement: X11 local input #841
Conversation
deb10b2
to
68c52c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this.
Unfortunately the PR is unreviewable due to unnecessary changes to code formatting.
Could you revert all of the needless changes? This can be done by:
git diff -U0 -w --no-color | git apply --cached --ignore-whitespace --unidiff-zero -
Thanks for the feedback! |
I think the changes that remove trailing whitespace can stay as many tools strip them and it's just annoying to everyone to revert again and again. Maybe you could splice them into a separate commit and do a PR with it? The changes that change the indentation are less useful. I think they should be reverted. Feel free to use spaces on the lines you change, but for existing code let's not change it for no reason. It breaks git blame which is very useful when investigating problems. The same is with the fixes to alignment in variable declarations. Feel free to not align variable names among themselves in different lines. This style requires constant realignments which is just waste of time, so let's avoid it for new code. |
88616e5
to
9770182
Compare
Allows to switch from client to server and vice versa if local input is detected, e.g. a touchscreen input or a mouse click if clients also have input devices
Allows to deactivate the screensaver and postpone screensaver activation if local input is detected on a client. This fixes the screensavers getting out of sync if a client has a local input device such as a touchscreen
9770182
to
b3fd233
Compare
I removed most of the whitespace changes and reworked my commits. I also resolved merge conflicts by rebasing onto the current master branch. |
I use barrier with this patch. This is a nice feature, and very comfortable. |
@tattsan Thanks for the positive feedback, I'm glad to hear that! What exactly do you mean by disabling the feature? In my experiments and usage scenario, this patch was more seen as a bug fix than a feature because without this patch, barrier sometimes behaves unpredictably, for example when it comes to screensavers activating and deactivating out of sync due to touchscreen inputs on the client. If you'd like to support me with additional information and maybe some testing, I'd be glad to hear from you! |
I sometimes want to leave the barrier cursor on the server and use the pen tablet on the client. |
This pull request targets two issues which were discovered in an environment where barrier is used to control two Linux machines with a touch screen each.
Due to the touch screen and potential other local input devices, some kind of bidirectional communication is necessary, going beyond the mainly unidirectional communication model currently employed in barrier (server -> client).
The two main problems discovered during tests of barrier as a software KVM switch and resolved by this PR are:
If the mouse cursor is located on the client and a touch input occurs on the server, the touch movement is translated to the client. Any touch input by the user thus does not appear at the location of the touch event but on the client display and may thus accidentally trigger unwanted behavior.
If the XScreensaver is currently active, input on the server deactivates the screen saver on the server and is propagated to the client. On the other hand, input on the client (touch, mouse movement, etc.) only deactivates the screen saver on the client and is not propagated to the server (or other clients).
The changes made in this PR mainly target the Linux/X11 implementation of barrier because other operating systems were not available for tests. Still, the changes should not affect functionality in other OSs or disrupt previous interoperability between OSs.