Skip to content

T9: Screensaver and suspend sync — StateMessage via D-Bus #15

Description

@jonocodes

Parent

#6

What to build

Keep the control surface in sync with desktop lock/suspend state. The daemon subscribes to two D-Bus signals and pushes StateMessage to all connected clients.

  • org.gnome.ScreenSaver.ActiveChanged(bool) on the session bus → push StateMessage(locked=True) on lock, StateMessage(locked=False) + current LayoutMessage on unlock.
  • org.freedesktop.login1.Manager.PrepareForSleep(bool) on the system bus → same locked/unlocked sequence on suspend/wake.

The client already has a StateMessage type; it should render a "desktop locked" overlay when locked=True and suppress input.

Acceptance criteria

  • Activating the GNOME screensaver causes the client to show a locked state
  • Deactivating the screensaver restores the client to the current layout
  • System suspend blanks the client; wake restores it
  • StateMessage(locked=True/False) is the only new protocol message; client suppresses widget input while locked
  • Test: simulate the D-Bus signal via the fake backend; assert StateMessage is pushed with correct value

Blocked by

Activity

  1. jonocodes commented on Sep 23, 2026

    @jonocodes
    OwnerAuthor

    Superseded by #160 (implemented in #164). #160 reworks this ticket's design — it splits session state into locked vs blanked rather than the single StateMessage(locked) boolean proposed here, adds the daemon-side input gate on top of the D-Bus sync, and carries the client UI, capability plumbing, and GNOME detection. Closing this as stale so it stops showing up as ready-for-agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    milestoneMilestone work item (post-spike)ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions