Skip to content

Idle inhibit state persists after closing special workspace until focus change #181

@pjbrzozowski

Description

@pjbrzozowski

Idle inhibit state persists after closing special workspace until focus change

Description

When a window in a special workspace is using Wayland idle inhibit protocol and the special workspace is closed (hidden), the idle inhibit state persists and prevents hypridle from activating, even though hyprctl clients shows inhibitingIdle: false for all windows. The inhibit only clears after manually changing window focus.

Steps to Reproduce

  1. Launch a Chromium app window (e.g., chromium --app=https://example.com) that uses idle inhibit
  2. Assign it to a special workspace (e.g., windowrulev2 = workspace special:test, class:(chrome-example))
  3. Open the special workspace with hyprctl dispatch togglespecialworkspace test
  4. Wait a few seconds for the web app to load and activate idle inhibit
  5. Verify idle inhibit is active: hyprctl clients -j | jq '.[] | select(.class == "chrome-example") | .inhibitingIdle' → returns true
  6. Close the special workspace with hyprctl dispatch togglespecialworkspace test
  7. Verify the special workspace is closed: hyprctl monitors -j | jq '.[0].specialWorkspace.id' → returns 0
  8. Check inhibit state: hyprctl clients -j | jq '.[] | select(.class == "chrome-example") | .inhibitingIdle' → returns false

Expected Behavior

When the special workspace is closed and all windows report inhibitingIdle: false, hypridle should immediately recognize that no windows are inhibiting idle and resume its timers.

Actual Behavior

Despite all windows showing inhibitingIdle: false, hypridle continues to believe something is inhibiting idle and does not activate its timers. Only after manually changing focus to a different window (e.g., switching workspaces or focusing another window) does hypridle recognize that the inhibit has been cleared.

Technical Details

  • The window in the special workspace correctly shows inhibitingIdle: false after closing the workspace
  • The special workspace is confirmed closed (specialWorkspace.id = 0 in monitor info)
  • Hyprland appears to not send an idle state change notification to hypridle when hiding special workspaces
  • The notification only triggers on explicit focus change events

Environment

  • Hyprland version: 0.52.2 (v0.52.2, commit 386376400119dd46a767c9f8c8791fd22c7b6e61)
  • hypridle version: 0.1.7

Impact

Users must manually change focus after closing special workspaces to allow screen locking/sleep timers to function, which is unexpected behavior and reduces system security (screen may not lock as expected).

Workaround

Manually change window focus after closing special workspaces that contained idle-inhibiting applications.

Configuration Example

# Toggle script
hyprctl dispatch togglespecialworkspace pikvm

# Window rule
windowrulev2 = workspace special:pikvm silent, class:(chrome-example.com__-Default)

Reproduction Apps

Tested with:

  • Chromium with --app flag
  • Moonlight game streaming client (com.moonlight_stream.Moonlight)

Both use Wayland idle inhibit protocol and exhibit this behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions