Preserve sketch-pad background in typing mode - #47
Open
Ehsan Azish (EhsanAzish80) wants to merge 2 commits into
Open
Preserve sketch-pad background in typing mode#47Ehsan Azish (EhsanAzish80) wants to merge 2 commits into
Ehsan Azish (EhsanAzish80) wants to merge 2 commits into
Conversation
Copilot started reviewing on behalf of
Ehsan Azish (EhsanAzish80)
August 10, 2026 14:31
View session
Author
|
@microsoft-github-policy-service agree |
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request fixes Issue #43 by ensuring the sketch-pad “blank screen” background is not cleared when transitioning from drawing into typing mode, so the background remains visible while typing over existing annotations.
Changes:
- Preserve
blankScreenwhen entering.typingby passing a newclearBlankScreenparameter toexitDrawingMode. - Add a self-test intended to prevent regressions around blank-screen clearing behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Sources/ZoomItMacCore/Overlay/ZoomCanvasView.swift | Adds a clearBlankScreen option to exitDrawingMode and uses it when entering typing mode to preserve the sketch-pad background. |
| Sources/ZoomItMacCore/SelfTest/SelfTestRunner.swift | Adds a regression-oriented self-test around blank-screen clearing policy. |
Suppressed comments (1)
Sources/ZoomItMacCore/Overlay/ZoomCanvasView.swift:64
- The comment says
exitDrawingModewarps the system cursor, but in this typing-mode transition it’s called withrestoreCursor: false, so no warp occurs. This is misleading and may confuse future changes around caret placement and cursor anchoring.
// When coming from drawing, the pen dot is already tracked in
// pointerViewPoint; exitDrawingMode warps the system cursor, so
// don't re-read the mouse. Otherwise sync to the real cursor so
// the caret appears under it and doesn't jump on the first move.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Ehsan Azish (EhsanAzish80)
August 10, 2026 14:38
View session
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.
Fixes #43.
Entering typing mode exits the drawing interaction state, but that transition also cleared
blankScreen, causing the sketch-pad background to disappear while existing annotations remained.This change preserves the blank-screen state when entering typing mode. Other drawing-mode exits continue to clear it normally.
A regression self-test verifies that:
Verification:
swift run ZoomItMacSelfTestpassesswift build --product ZoomItpasses