-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
cursor bound to single screen #83
Comments
Yes, this is macos related. The API is a bit weird there: lan-mouse/src/backend/consumer/macos.rs Line 120 in 5cc8cda
Problem is that unless the absolute mouse position is restricted to screen boundaries, the relative motion gets lost in fullscreen applications. I currently restrict it to the primary screen. Need to fix that but have not yet found the time. diff --git a/src/backend/consumer/macos.rs b/src/backend/consumer/macos.rs
index 954ec2b..3c45e13 100644
--- a/src/backend/consumer/macos.rs
+++ b/src/backend/consumer/macos.rs
@@ -135,8 +135,8 @@ impl EventConsumer for MacOSConsumer {
}
};
- mouse_location.x = (mouse_location.x + relative_x).clamp(min_x, max_x - 1.);
- mouse_location.y = (mouse_location.y + relative_y).clamp(min_y, max_y - 1.);
+ mouse_location.x = (mouse_location.x + relative_x);
+ mouse_location.y = (mouse_location.y + relative_y);
let mut event_type = CGEventType::MouseMoved;
if self.button_state.left { This patch should remove this restriction but therefore breaks fullscreen apps that grab the mouse (safe the patch to a file (e.g. git apply < patch |
What compositor are you using on the server side? |
That restriction removal works, but then seems to let the mouse descend off the edge display forever. I'm using hyprland. Would you like a separate issue made? |
A yeah, Hyprland has some issues.
hyprwm/Hyprland#4465 But there is nothing I can fix on my end. |
Good news, shortcuts-inhibit is now implemented. hyprwm/Hyprland#4889 is requesting for testing, specifically for 4665 but maybe 4464 is also potentially fixed? Maybe you already saw all of this, but figured getting your input on the fix would be nice. |
Yes I have seen it but not hat the time to test until now. |
For the macos issue where the cursor is stuck on a single monitor, I have implemented a fix: #202 |
With the merge of #81, I was able to test lan-mouse for the first time between a Linux server and MacOS client. I'm using multiple screens and see that when the mouse works on the remote client screen, it is not able to continue to the adjoining screens.
I was kind of hoping that the mouse would automatically release on the edge when traversing to go back to the server. Unsure if that's because of the above issue or if you have to press the release keys by design.
(Unrelated, but there is some keyboard weirdness with the server not passing through keystrokes that are already mapped for usage in the compositor. Will report that later in another issue.)
The text was updated successfully, but these errors were encountered: