Repository navigation
Conversation
A per-window handle, taken when a top-level output window is exposed and dropped when it is hidden, minimized or closed, so a preview or a hidden output does not keep the display awake: - org.freedesktop.ScreenSaver.Inhibit when built with Qt DBus (KDE also dims projectors over DDC/CI). The call is asynchronous, and a release arriving before the cookie undoes the inhibition once it comes; - a PreventUserIdleDisplaySleep assertion on macOS; - SetThreadExecutionState on Windows, which also keeps the system from idle sleep. The windows share one OS inhibition, taken by the first holder and dropped by the last, on the GUI thread (asserted). A minimized or embedded window holds nothing. The freedesktop Inhibit reply comes late, so its protocol is a small state machine of its own (ScreenSaverInhibition); a failed call is tried again the next time an output window shows. Nothing reaches the OS on the offscreen and minimal platforms, nor with SCORE_NO_IDLE_INHIBIT set, which the test environment sets so that test runs never inhibit the developer's session. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KdPgujQFUTMVZBdH6Hv7Vj
This branch is waiting to be deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Displays driven by score could go to sleep, or be dimmed, when the machine saw no input. A top-level output window now holds an idle inhibition while it is exposed. It drops the inhibition when the window is hidden, minimized or closed, so a preview or a hidden output does not keep the display awake.
org.freedesktop.ScreenSaver.Inhibitwhen built with Qt DBus. KDE also dims projectors over DDC/CI. The call is asynchronous. A release that arrives before the cookie undoes the inhibition once the cookie comes. A failed call is tried again the next time an output window shows.PreventUserIdleDisplaySleepassertion.SetThreadExecutionState, which also keeps the system from idle sleep.The windows share one OS inhibition, taken by the first holder and dropped by the last, on the GUI thread (asserted). A minimized or embedded window holds nothing. The freedesktop protocol, whose reply comes late, is its own small state machine (
ScreenSaverInhibition), so it can be tested without D-Bus.Nothing reaches the OS on the offscreen and minimal platforms, or when
SCORE_NO_IDLE_INHIBITis set. The test environment (cmake/ScoreTests.cmake) sets it, so test runs never inhibit the developer's session.Commits
b8b6cacee1gfx: an output window keeps the displays awakeTests
test_gfx_idle_inhibitor(tests/gfx/GfxIdleInhibitor.cpp) covers: the inhibition is sent once and undone once; a release before the Inhibit reply undoes it when the reply comes; wanted again before the reply, it is kept; a failed Inhibit is sent again on the next want; inhibitors count each holder once; a shown output window holds the display awake and a hidden one does not.test_gfx_shader_corpus_targets,test_gfx_window_layout,test_threedim_ply_fingerprint,test_unit_miniaudio_alsaand the few others master's run lists).Notes for review
🤖 Generated with Claude Code
https://claude.ai/code/session_01KdPgujQFUTMVZBdH6Hv7Vj