Context
The retreat behavior (pet ambles to a corner and sleeps) has two intended triggers:
- A — rare cadence (~every 30 min of runtime): implemented / planned as the reliable path.
- B — user inactivity (~5 min of no input → sleep until the user returns): stubbed for now.
Why B is stubbed
goob is a click-through overlay with mouse passthrough clipped to the pet's rect, so the app never sees the global cursor when it's off the pet — we can't measure idleness from cursor movement. And on the dev machine (KDE Plasma / kwin_wayland), the easy system idle sources don't work on Wayland:
org.freedesktop.ScreenSaver.GetSessionIdleTime → NotSupported on Wayland (X11-only).
logind IdleHint stays no / only flips at the coarse system idle timeout.
- No
swayidle/kidletime present.
The proper cross-compositor signal is the ext-idle-notify-v1 Wayland protocol (KWin supports it), which needs a native Wayland client — a small GDExtension or an external helper binary invoked from Godot.
Task
Implement Trigger B via a real idle source:
Until then, retreat runs on the cadence trigger only.
Context
The
retreatbehavior (pet ambles to a corner and sleeps) has two intended triggers:Why B is stubbed
goob is a click-through overlay with mouse passthrough clipped to the pet's rect, so the app never sees the global cursor when it's off the pet — we can't measure idleness from cursor movement. And on the dev machine (KDE Plasma / kwin_wayland), the easy system idle sources don't work on Wayland:
org.freedesktop.ScreenSaver.GetSessionIdleTime→NotSupportedon Wayland (X11-only).logindIdleHintstaysno/ only flips at the coarse system idle timeout.swayidle/kidletimepresent.The proper cross-compositor signal is the
ext-idle-notify-v1Wayland protocol (KWin supports it), which needs a native Wayland client — a small GDExtension or an external helper binary invoked from Godot.Task
Implement Trigger B via a real idle source:
ext-idle-notify-v1helper (GDExtension or external process that emits idle/resume events), or a best-effortlogind IdleHintpoll where it works.retreatidle hook in the behavior engine.Until then,
retreatruns on the cadence trigger only.