Add exact window control tool#317
Closed
zengfanfan wants to merge 1 commit into
Closed
Conversation
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.
Summary
Adds a new exact
Windowtool for deterministic window workflows without fuzzy matching:mode="find"returns matching windows with handle, PID, process, title, status, outer bounds, and client bounds;mode="activate"brings an exact handle to foreground and verifies foreground readback;mode="bounds"reports or sets exact outer/client bounds and returns actual geometry.Motivation
The existing
Apptool is convenience-oriented and supports fuzzy name matching. This PR keeps that behavior unchanged and adds a separate exact path for workflows that must avoid selecting similarly titled windows.Issue: #316
Public API
Matching is exact for handles/PIDs/process basenames and exact-or-contains for titles. Client bounds are converted to outer bounds using current frame/client deltas, then actual geometry is returned after Windows applies constraints.
Testing
Focused checks passed:
Focused pytest result:
Full repository pytest was also run and still shows the pre-existing baseline failures unrelated to this PR:
Notes
This PR is independent from deterministic drag PR #313 and guarded input PR #315. It does not include local planning documents or private consumer details.