Skip to content

Focus the existing window when opening Markdown files - #193

Merged
alecdotdev merged 1 commit into
sftwrdotdev:masterfrom
daniel-grabowski:pr/focus-existing-window-on-open
Jul 1, 2026
Merged

Focus the existing window when opening Markdown files#193
alecdotdev merged 1 commit into
sftwrdotdev:masterfrom
daniel-grabowski:pr/focus-existing-window-on-open

Conversation

@daniel-grabowski

Copy link
Copy Markdown
Contributor

Summary

  • Route file-open requests from secondary app launches through the already running main window.
  • Show, unminimize, and focus the window after receiving a Markdown file path so the opened document is visible immediately.
  • Keep the Windows target check warning-free by marking the macOS-only clipboard scaling parameter as intentionally unused on other platforms.

Issue

fixes #191

Testing

  • cargo xwin check --target x86_64-pc-windows-msvc
  • git diff --check

Notes

  • This PR is intentionally limited to the Tauri window/file-open path. It does not include local release artifacts or process journal files.

Opening another Markdown file now routes the path to the running instance and brings the existing window forward instead of leaving it hidden behind other windows.

The Windows target also silences the non-macOS clipboard image scaling parameter warning, keeping the PR check clean.

fixes sftwrdotdev#191
@alecdotdev
alecdotdev merged commit f0b1236 into sftwrdotdev:master Jul 1, 2026
1 check passed
@daniel-grabowski
daniel-grabowski deleted the pr/focus-existing-window-on-open branch July 7, 2026 13:41
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.

you already open a file with markhub, when you open a new .md,it will not open.

2 participants