Repository navigation
feat(desktop-gpui): resize a picked window to a ratio or size, and focus it to record it alone - #3454
Open
richiemcilroy wants to merge 19 commits into
Open
richiemcilroy wants to merge 19 commits into
richiemcilroy wants to merge 19 commits into
Conversation
…cus it to record it alone
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
|
hey @greptileai, please re-review the PR |
# Conflicts: # apps/desktop-gpui/src/picker_probe.rs
… pin the size menu's window, ignore stale moves, restore maximized windows
# Conflicts: # apps/desktop-gpui/src/picker_probe.rs
Member
Author
|
hey @greptileai, please re-review the PR |
…he smoke's test window outright
Member
Author
|
hey @greptileai, please re-review the PR |
…gion, and spawn the restore
Member
Author
|
hey @greptileai, please re-review the PR |
This branch was successfully 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.
Stacked on #3452.
Problem
In the window picker, the picked window's size was plain text, and the only way to change the shape of what gets recorded was to resize the window by hand. A window recording also captured a region of the screen. #3452 adds the option to record the window by itself, but nothing in the app could turn it on.
Change
foreign_windowdoes the platform work:AXPosition/AXSize, matched to the window through_AXUIElementGetWindow), which Cap already holds the permission for.SetWindowPos, adding back DWM's invisible resize borders and restoring a maximized window first. The maximized window'sWINDOWPLACEMENTis saved, so putting it back maximizes it again with its old restore size._NET_MOVERESIZE_WINDOWand_NET_ACTIVE_WINDOW.SetWindowPoswaits on the target app. So a cancel's restore always lands after a move the user started first. The highlight then animates to wherever the app actually put the window, since apps clamp to their own minimum sizes or cell grids. A move that finishes after the user has picked another window, or closed the picker, leaves the new choice alone.The new overlay strings are literals, like the rest of the overlay on this base. #3423 localizes the overlay, and they move into its catalogue when this rebases onto it. The settings row and options are localized in all seven catalogues.
Test
Unit tests (
window_arrange, andforeign_window's ordering of queued jobs):i18n: the i18n surface tests pin the new keys, and
cap-i18n-buildpasses.Real app:
Picker smoke (real app)now drives a real window on macOS, Windows and Linux X11 through the overlay's own menu and toggle. It picks the window it opened (TextEdit, Notepad or xterm) outright, so the runner's cursor position doesn't matter:Screenshots of each step are uploaded.
Wait to merge until recording waits for pending window moves.
Findings
Fix with agent prompt
Summary
Adds window size and ratio choices, a shared Focus toggle, platform window movement, and a saved capture-style setting.
These issues remain in the inspected higher stack revisions, including #3456.
Reviews (6) · Last reviewed commit: "fix(desktop-gpui): colour the window siz..." · Reviewed by Greptile