Repository navigation
refactor(computer): keep the display open for the length of a hold - #1796
Merged
Merged
Conversation
A person who holds the screen can press a pointer button, move and let go, which drags. A button still down when the screen is handed back is released. Resolves #1792
A hold opens its display on the first input and reuses it for the inputs that follow, instead of detecting the display and reading the screen size for every one. It closes at the hand-back and reopens once it is two seconds old, so a resized screen is driven at its new size. Resolves #1793
A hold opens its display on the first input and reuses it for the inputs that follow, instead of detecting the display and reading the screen size for every one. It closes at the hand-back and reopens once it is two seconds old, so a resized screen is driven at its new size. Resolves #1793
…' into refactor/hold-display-controller
Contributor
|
🎉 This PR is included in version 0.253.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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
ScreenControl.Driveset the display up from scratch for every person input: detect the display, open a controller, read the screen size, act, close. Typing sends one input per character, so a sentence repeated that dozens of times. A hold now opens its display once and reuses it.Resolves #1793
Changes
internal/computer/held_display.go-heldDisplay, the display a person drives during one hold. It opens on the first input, serves the inputs that follow one at a time, and closes at the hand-back.internal/computer/screen_control.go-Driveruns its input through the held display,TakeOverbegins the hold andHandBackends it. A button still pressed at the hand-back is released on the display that is already open.Behaviour notes:
On GNOME Wayland opening a controller costs two round trips to the shell for the screen size, which is what each reused input now skips. The gain is not measured.
Testing
task precommit:runandtask testpass. New tests cover one display across several inputs, the reopen once it is stale, the close at the hand-back, releasing a held button on the open display, and the refusal after a hand-back.Not included
The screenshot capture loop does the same setup for every capture. It is named in the issue but is not part of its acceptance criteria, and is left as it is.
no docs ticket: internal-only refactor