Skip to content
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

Hyprland not working with 1px shell surface #135

Open
Clutchnp opened this issue May 20, 2024 · 10 comments
Open

Hyprland not working with 1px shell surface #135

Clutchnp opened this issue May 20, 2024 · 10 comments

Comments

@Clutchnp
Copy link

Clutchnp commented May 20, 2024

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!

@feschber
Copy link
Owner

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.

@Clutchnp
Copy link
Author

Clutchnp commented May 20, 2024

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

@ch4og
Copy link

ch4og commented 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

@Clutchnp
Copy link
Author

This solution tested and works

@feschber
Copy link
Owner

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

@Clutchnp
Copy link
Author

Oh mb i closed this by mistake

@Clutchnp Clutchnp reopened this Jun 19, 2024
@feschber feschber changed the title Hyprland Crashing during input capture Hyprland not working with 1px shell surface Jun 28, 2024
@feschber
Copy link
Owner

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 ...

@feschber
Copy link
Owner

You can use the patched hyprland-fix branch for now

@interbattles
Copy link

interbattles commented 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

@Clutchnp
Copy link
Author

Clutchnp commented Jul 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants