lan-mouse icon indicating copy to clipboard operation
lan-mouse copied to clipboard

idle inhibit on unfocused computers

Open sodiboo opened this issue 1 year ago • 4 comments

I've just come across lan-mouse, and to use it i had to implement some stuff in my compositor (lol). There are a couple annoyances that i've experienced which i think mostly boil down to limitations in being a wayland client (most notably, i would love if keyboard focus would stay on the previous computer even if my mouse is on another, particularly because it fucks with my window rules and causes the focused window to flicker its transparency). One thing that i'm fairly certain isn't a limitation, and feels more like a bug is this:

When i am moving my mouse and actively using one computer, the other computer is counted as "idle" and my swayidle events are triggered. Eventually this causes my laptop to spawn swaylock, which is annoying. It would be nice if lan-mouse would detect the idleness of the "active" computer (e.g. if i'm actually idle, then allow all idle timers to increment) and properly activate an idle inhibitor on the other computers accordingly.

I'm not sure how well/easily this concept translates to non-Wayland platforms, but personally i only care to use lan-mouse on Wayland, so it really doesn't matter to me.

sodiboo avatar Aug 26 '24 21:08 sodiboo

lan-mouse does currently not do any idle inhibition. When controlling device B from A, device A should not be able to idle since there is pointer motion captured on A, however if device A is used while device B is "connected", there is nothing preventing device B from idling.

Is that what you mean? In that case it would probably require something similar to idle notify on device A to check if it is idle and idle inhibition on device B.

But yeah this is not implemented.

feschber avatar Aug 26 '24 22:08 feschber

however if device A is used while device B is "connected", there is nothing preventing device B from idling.

Is that what you mean?

Yes. This is the same physical topology of my setup where I would not expect device B to be idle.

sodiboo avatar Aug 26 '24 23:08 sodiboo

Ideally configurable per client device:

however if device A is used while device B is "connected", there is nothing preventing device B from idling. Is that what you mean?

Yes. This is the same physical topology of my setup where I would not expect device B to be idle.

but device C is only accessed rarely and can idle/lock the screen

poddmo avatar Aug 27 '24 03:08 poddmo

To add to this a bit ... I have [B] [A] [C], if swaylock is triggered by normal idle timeout on [B] while I'm working on [A] and I accidentally mouse too far left (into [B]) the mouse cursor is captured by [B] until I unlock [B]. Which of course can become annoying pretty quickly. This issue would fix that, or maybe a (configurable) dead-zone buffer of 200-300px between screens would also help. (swayfx/niri).

Loving lan-mouse otherwise, thank you so much for it.

kevinclevenger avatar Oct 14 '24 21:10 kevinclevenger