[PR #841] Enhancement: X11 local input #1706

Open
opened 2026-05-05 07:59:56 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/debauchee/barrier/pull/841
Author: @florianhofhammer
Created: 8/18/2020
Status: 🔄 Open

Base: masterHead: enhancement/x-server-client-local-input


📝 Commits (2)

  • b891b1e Allow screen switching on local XInput
  • b3fd233 Allow XScreensaver syncing from client to server

📊 Changes

17 files changed (+450 additions, -122 deletions)

View changed files

📝 src/lib/barrier/Screen.cpp (+3 -5)
📝 src/lib/barrier/protocol_types.cpp (+3 -2)
📝 src/lib/barrier/protocol_types.h (+19 -4)
📝 src/lib/base/EventTypes.cpp (+1 -0)
📝 src/lib/base/EventTypes.h (+10 -0)
📝 src/lib/client/Client.cpp (+52 -10)
📝 src/lib/client/Client.h (+3 -0)
📝 src/lib/client/ServerProxy.cpp (+24 -9)
📝 src/lib/client/ServerProxy.h (+8 -4)
📝 src/lib/platform/XWindowsScreen.cpp (+86 -32)
📝 src/lib/platform/XWindowsScreen.h (+6 -1)
src/lib/server/ClientProxy1_7.cpp (+83 -0)
src/lib/server/ClientProxy1_7.h (+42 -0)
📝 src/lib/server/ClientProxyUnknown.cpp (+5 -0)
📝 src/lib/server/PrimaryClient.cpp (+4 -4)
📝 src/lib/server/Server.cpp (+97 -50)
📝 src/lib/server/Server.h (+4 -1)

📄 Description

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 server and a local touch (or mouse) input occurs on the client, a second cursor appears on the client and both devices have focus.
    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 not currently active, local input on the client (no matter whether through a touch screen as described before or through directly attached mouse or keyboard input devices) cannot prevent the screen saver from activating.
    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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/debauchee/barrier/pull/841 **Author:** [@florianhofhammer](https://github.com/florianhofhammer) **Created:** 8/18/2020 **Status:** 🔄 Open **Base:** `master` ← **Head:** `enhancement/x-server-client-local-input` --- ### 📝 Commits (2) - [`b891b1e`](https://github.com/debauchee/barrier/commit/b891b1e6309f7ad215f82f2d2165caf4566bed8b) Allow screen switching on local XInput - [`b3fd233`](https://github.com/debauchee/barrier/commit/b3fd2335b32b15aa81b741cbd05d0b75614b49e8) Allow XScreensaver syncing from client to server ### 📊 Changes **17 files changed** (+450 additions, -122 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/barrier/Screen.cpp` (+3 -5) 📝 `src/lib/barrier/protocol_types.cpp` (+3 -2) 📝 `src/lib/barrier/protocol_types.h` (+19 -4) 📝 `src/lib/base/EventTypes.cpp` (+1 -0) 📝 `src/lib/base/EventTypes.h` (+10 -0) 📝 `src/lib/client/Client.cpp` (+52 -10) 📝 `src/lib/client/Client.h` (+3 -0) 📝 `src/lib/client/ServerProxy.cpp` (+24 -9) 📝 `src/lib/client/ServerProxy.h` (+8 -4) 📝 `src/lib/platform/XWindowsScreen.cpp` (+86 -32) 📝 `src/lib/platform/XWindowsScreen.h` (+6 -1) ➕ `src/lib/server/ClientProxy1_7.cpp` (+83 -0) ➕ `src/lib/server/ClientProxy1_7.h` (+42 -0) 📝 `src/lib/server/ClientProxyUnknown.cpp` (+5 -0) 📝 `src/lib/server/PrimaryClient.cpp` (+4 -4) 📝 `src/lib/server/Server.cpp` (+97 -50) 📝 `src/lib/server/Server.h` (+4 -1) </details> ### 📄 Description 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 server and a local touch (or mouse) input occurs on the client, a second cursor appears on the client and both devices have focus. 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 not currently active, local input on the client (no matter whether through a touch screen as described before or through directly attached mouse or keyboard input devices) cannot prevent the screen saver from activating. 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror added the
pull-request
label 2026-05-05 07:59:56 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#1706
No description provided.