[GH-ISSUE #135] Hyprland not working with 1px shell surface #57

Closed
opened 2026-05-05 22:07:08 -06:00 by gitea-mirror · 12 comments
Owner

Originally created by @Clutchnp on GitHub (May 20, 2024).
Original GitHub issue: https://github.com/feschber/lan-mouse/issues/135

hyprlandCrashReport621782.txt

While capturing input if mouse is taken to the edge of the screen hyprland crashes

[2024-05-20T13:19:08Z WARN  lan_mouse::config] Continuing without config file ...
[2024-05-20T13:19:08Z INFO  lan_mouse] release bind: [KeyLeftCtrl, KeyLeftShift, KeyLeftMeta, KeyLeftAlt]
[2024-05-20T13:19:08Z INFO  lan_mouse::capture_test] running input capture test
[2024-05-20T13:19:08Z INFO  lan_mouse::capture_test] creating input capture
[2024-05-20T13:19:08Z INFO  lan_mouse::capture] libei input capture not available: ZBus Error: org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.InputCapture” on object at path /org/freedesktop/portal/desktop
[2024-05-20T13:19:08Z INFO  lan_mouse::capture] using layer-shell input capture
[2024-05-20T13:19:08Z INFO  lan_mouse::capture_test] creating clients```

Thanks!

Originally created by @Clutchnp on GitHub (May 20, 2024). Original GitHub issue: https://github.com/feschber/lan-mouse/issues/135 [hyprlandCrashReport621782.txt](https://github.com/feschber/lan-mouse/files/15377432/hyprlandCrashReport621782.txt) While capturing input if mouse is taken to the edge of the screen hyprland crashes ```[2024-05-20T13:19:08Z WARN lan_mouse::config] /home/clutch/.config/lan-mouse/config.toml: No such file or directory (os error 2) [2024-05-20T13:19:08Z WARN lan_mouse::config] Continuing without config file ... [2024-05-20T13:19:08Z INFO lan_mouse] release bind: [KeyLeftCtrl, KeyLeftShift, KeyLeftMeta, KeyLeftAlt] [2024-05-20T13:19:08Z INFO lan_mouse::capture_test] running input capture test [2024-05-20T13:19:08Z INFO lan_mouse::capture_test] creating input capture [2024-05-20T13:19:08Z INFO lan_mouse::capture] libei input capture not available: ZBus Error: org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.InputCapture” on object at path /org/freedesktop/portal/desktop [2024-05-20T13:19:08Z INFO lan_mouse::capture] using layer-shell input capture [2024-05-20T13:19:08Z INFO lan_mouse::capture_test] creating clients``` Thanks!
Author
Owner

@feschber commented on GitHub (May 20, 2024):

That's a Hyprland regression (something with the pointer constraints by the looks of things). Please report there and link the issue here. A crash should be easy to fix.

<!-- gh-comment-id:2120484731 --> @feschber commented on GitHub (May 20, 2024): That's a Hyprland regression (something with the pointer constraints by the looks of things). Please report there and link the issue here. A crash should be easy to fix.
Author
Owner

@Clutchnp commented on GitHub (May 20, 2024):

Thanks for looking , I have made an issue at the Hyprland repo which can be tracked here

<!-- gh-comment-id:2120660950 --> @Clutchnp commented on GitHub (May 20, 2024): Thanks for looking , I have made an issue at the Hyprland repo which can be tracked [here](https://github.com/hyprwm/Hyprland/issues/6170)
Author
Owner

@ch4og commented on GitHub (May 20, 2024):

I only see this behavior when using the stable version of Hyprland. There are no crashes when using the git version, but on git version I can't move the cursor if the other computer's location is set to [left] or [top], only [bottom] and [right] works. That's clearly a regression cause on hyprland 0.39.1 it works great

<!-- gh-comment-id:2121055447 --> @ch4og commented on GitHub (May 20, 2024): I only see this behavior when using the stable version of Hyprland. There are no crashes when using the git version, but on git version I can't move the cursor if the other computer's location is set to [left] or [top], only [bottom] and [right] works. That's clearly a regression cause on hyprland 0.39.1 it works great
Author
Owner

@Clutchnp commented on GitHub (May 23, 2024):

This solution tested and works

<!-- gh-comment-id:2126875729 --> @Clutchnp commented on GitHub (May 23, 2024): This [solution](https://github.com/hyprwm/Hyprland/issues/6170#issuecomment-2124426896) tested and works
Author
Owner

@feschber commented on GitHub (Jun 19, 2024):

@Clutchnp has this been fixed upstream because you closed the issue?

<!-- gh-comment-id:2178012467 --> @feschber commented on GitHub (Jun 19, 2024): @Clutchnp has this been fixed upstream because you closed the issue?
Author
Owner

@Clutchnp commented on GitHub (Jun 19, 2024):

Oh mb i closed this by mistake

<!-- gh-comment-id:2178246944 --> @Clutchnp commented on GitHub (Jun 19, 2024): Oh mb i closed this by mistake
Author
Owner

@feschber commented on GitHub (Jun 28, 2024):

diff --git a/src/capture/wayland.rs b/src/capture/wayland.rs
index 9f2b82c..1aac930 100644
--- a/src/capture/wayland.rs
+++ b/src/capture/wayland.rs
@@ -146,8 +146,8 @@ impl Window {
         let g = &state.g;
 
         let (width, height) = match pos {
-            Position::Left | Position::Right => (1, size.1 as u32),
-            Position::Top | Position::Bottom => (size.0 as u32, 1),
+            Position::Left | Position::Right => (2, size.1 as u32),
+            Position::Top | Position::Bottom => (size.0 as u32, 2),
         };
         let mut file = tempfile::tempfile().unwrap();
         draw(&mut file, (width, height));

Temporary workaround. I could upstream this but I'd rather get it fixed in Hyprland ...

<!-- gh-comment-id:2196546836 --> @feschber commented on GitHub (Jun 28, 2024): ```diff diff --git a/src/capture/wayland.rs b/src/capture/wayland.rs index 9f2b82c..1aac930 100644 --- a/src/capture/wayland.rs +++ b/src/capture/wayland.rs @@ -146,8 +146,8 @@ impl Window { let g = &state.g; let (width, height) = match pos { - Position::Left | Position::Right => (1, size.1 as u32), - Position::Top | Position::Bottom => (size.0 as u32, 1), + Position::Left | Position::Right => (2, size.1 as u32), + Position::Top | Position::Bottom => (size.0 as u32, 2), }; let mut file = tempfile::tempfile().unwrap(); draw(&mut file, (width, height)); ``` Temporary workaround. I could upstream this but I'd rather get it fixed in Hyprland ...
Author
Owner

@feschber commented on GitHub (Jun 28, 2024):

You can use the patched hyprland-fix branch for now

<!-- gh-comment-id:2196551344 --> @feschber commented on GitHub (Jun 28, 2024): You can use the patched [hyprland-fix branch](https://github.com/feschber/lan-mouse/tree/hyprland-fix) for now
Author
Owner

@allisonmeow commented on GitHub (Jul 1, 2024):

whats the difference between this and https://github.com/drendog/Hyprland/tree/fix/cursor-min-padding nevermind, but are we planning for that to be fixed on hyprland or merging this branch at some point

<!-- gh-comment-id:2199197197 --> @allisonmeow commented on GitHub (Jul 1, 2024): ~whats the difference between this and https://github.com/drendog/Hyprland/tree/fix/cursor-min-padding~ nevermind, but are we planning for that to be fixed on hyprland or merging this branch at some point
Author
Owner

@Clutchnp commented on GitHub (Jul 1, 2024):

Waiting for #6027 to be merged, until then you can hyprland-fix-branch of lan-mouse

<!-- gh-comment-id:2199204040 --> @Clutchnp commented on GitHub (Jul 1, 2024): Waiting for [#6027](https://github.com/hyprwm/Hyprland/pull/6027) to be merged, until then you can hyprland-fix-branch of lan-mouse
Author
Owner

@Clutchnp commented on GitHub (Jul 2, 2024):

With #6027 merged this should be resolved thanks everyone !!

<!-- gh-comment-id:2203750538 --> @Clutchnp commented on GitHub (Jul 2, 2024): With #6027 merged this should be resolved thanks everyone !!
Author
Owner

@feschber commented on GitHub (Jul 2, 2024):

Yes can confirm! Thanks everyone for your patience ;).

<!-- gh-comment-id:2203789838 --> @feschber commented on GitHub (Jul 2, 2024): Yes can confirm! Thanks everyone for your patience ;).
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/lan-mouse#57
No description provided.