Skip to content

Add clean window snip feature with hotkey and UI support - #128

Merged
dimitar-radenkov merged 1 commit into
masterfrom
feature/114-clean-window-capture-hotkey
Jun 27, 2026
Merged

dimitar-radenkov merged 1 commit into
masterfrom
feature/114-clean-window-capture-hotkey

Conversation

@dimitar-radenkov

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 27, 2026 15:47
@codecov-commenter

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new “clean window snip” capture mode that can be triggered via a configurable global hotkey and from the tray menu, captures the window under the cursor, and opens it in the overlay with a beautified (padded + shadow) presentation.

Changes:

  • Add new persisted setting + settings UI/shortcuts UI to configure a “Clean window snip” hotkey.
  • Add a new global hotkey event and tray menu entry to trigger clean window snips.
  • Introduce window-under-cursor capture (PrintWindow with screen-capture fallback) and a new overlay session mode to preserve behavior for this flow.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Pointframe/Views/SettingsWindow.xaml.cs Adds key-capture handlers for the new clean-window hotkey in both the Capture and Shortcuts sections.
Pointframe/Views/SettingsWindow.xaml Adds UI for configuring the clean-window hotkey and exposes it in the shortcuts list with automation IDs.
Pointframe/Views/OverlayWindow.xaml.cs Extends InitializeFromImage to accept a session mode and stores it for later layout/behavior decisions.
Pointframe/Views/OverlayWindow.Layout.cs Ensures “opened image” initialization doesn’t overwrite WindowClean mode and propagates the current mode into session entry.
Pointframe/ViewModels/SettingsViewModel.cs Adds VM properties/commands for the clean-window hotkey, includes them in load/save/defaults flows.
Pointframe/Services/Infrastructure/UserSettingsService.cs Updates settings cloning to preserve the new clean-window hotkey fields.
Pointframe/Services/Infrastructure/TrayIconManager.cs Adds a tray menu item and callback wiring for “Clean window snip”.
Pointframe/Services/Infrastructure/IGlobalHotkeyService.cs Adds CleanWindowSnipRequested event to the global hotkey service contract.
Pointframe/Services/Infrastructure/GlobalHotkeyService.cs Detects the new hotkey and raises CleanWindowSnipRequested.
Pointframe/Services/Capture/WindowCaptureService.cs New service to capture the window under the cursor via PrintWindow with fallback to screen capture.
Pointframe/Services/Capture/IWindowCaptureService.cs New interface for window-under-cursor capture.
Pointframe/Services/Capture/ICaptureLaunchService.cs Adds StartCleanWindowSnip API for capture launching.
Pointframe/Services/Capture/CaptureLaunchService.cs Implements clean-window snip launch, beautifies the captured bitmap, and opens it in the overlay with WindowClean mode.
Pointframe/Models/UserSettings.cs Adds persisted defaults for the clean-window hotkey and modifiers.
Pointframe/Models/SelectionSessionMode.cs Adds new WindowClean session mode.
Pointframe/App.xaml.cs Wires the new tray action + global hotkey event and registers IWindowCaptureService.
Pointframe.Tests/ViewModels/SettingsViewModelTests.cs Adds tests for clean-window hotkey defaults and persistence through Save().
Pointframe.Tests/SettingsWindowTests.cs Adds a UI-level test ensuring the clean-window hotkey capture callback updates the VM.
Pointframe.Tests/Services/TrayIconManagerTests.cs Updates test setup for the new tray callback parameter.
Pointframe.Tests/Services/GlobalHotkeyServiceTests.cs Adds a basic test covering subscription/invocation of the new event.
Pointframe.Tests/OverlayWindowInteractionTests.cs Adds a test ensuring WindowClean mode is preserved when initializing from an image.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dimitar-radenkov
dimitar-radenkov merged commit ea85f55 into master Jun 27, 2026
6 checks passed
@dimitar-radenkov
dimitar-radenkov deleted the feature/114-clean-window-capture-hotkey branch June 27, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants