Repository navigation
feat(desktop): find the owner's windows, what is never granted, and a picture of one - #169
Merged
Merged
Conversation
… picture of one The first part of D1 (spec 24.3, 24.4), in the platform layer: the top-level windows of the owner's session (shown or minimized, with a title, not tool windows nor cloaked ones), the program each one is from (its executable, named by its file description; a Store app by the core window inside its frame) and whether it runs as administrator. The list of what is never granted (Botloft, elevated windows, terminals and command boxes with the Run box, Task Manager, password managers and the Credential Manager) is pure code with tests. A picture of a window comes from PrintWindow with full content, in real pixels, cropped to the DWM frame, shrunk to logical pixels up to 1600 x 1200 and encoded as a JPEG (jpeg-encoder). Other systems say the desktop is not there yet. Tested with a real window of the test's own on Windows 11: listed with its app, pictured red behind others, minimized, closed.
httpsphl
enabled auto-merge
October 4, 2026 21:05
…same on every system
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.
What
The first part of D1 (spec 24.3, 24.4). It is only the platform layer: nothing calls it yet, and the bot's tools come in D1c.
platform::desktop::windows()lists the top-level windows of the owner's session:FileDescriptionin its version info (for example "Microsoft Excel");ApplicationFrameHostframe;blocked.rs), pure code with tests:mmcconsoles, Task Manager;platform::desktop::picture(id):PrintWindowwithPW_RENDERFULLCONTENT, measured in real pixels (per-monitor DPI on the thread);jpeg-encodercrate (pure Rust, no dependencies).Checks
cargo fmtandclippy -D warningspass on Windows.PrintWindowon GPU apps (Chromium, Electron) and while the screen is locked.