Skip to content

Conversation

@xandri19wang
Copy link

If a new File Explorer window navigates to a folder that's already open elsewhere, simply bring the existing window to front. Do NOT close any window (no flicker, no accidental kills). Hold a configurable modifier key (Shift by default) to bypass dedup and allow another window. Extras

Grace delay so the new window can finish navigation (/select, filename etc.) before we decide. Special handling for the Downloads known folder (shell: Downloads and its GUID). If you ever want closing behavior, switch Duplicate Action in settings. Notes

Dedup is window-level. Tabs inside the same Explorer window are not merged (Windows API doesn't expose tab list here). Virtual / non-file-system locations are ignored, except Downloads which is resolved to its physical path.

Soft Dedup (natural behavior)

If a new File Explorer window navigates to a folder that's already open elsewhere, simply bring the existing window to front. Do NOT close any window (no flicker, no accidental kills).
Hold a configurable modifier key (Shift by default) to bypass dedup and allow another window.
Extras

Grace delay so the new window can finish navigation (/select,filename etc.) before we decide.
Special handling for the Downloads known folder (shell:Downloads and its GUID).
If you ever want closing behavior, switch DuplicateAction in settings.
Notes

Dedup is window-level. Tabs inside the same Explorer window are not merged (Windows API doesn't expose tab list here).
Virtual / non-file-system locations are ignored, except Downloads which is resolved to its physical path.
Gentler dedup, fewer "restart-like" hiccups:
- Double stability checks (new + existing window).
- Gentle close: minimize first, then async WM_CLOSE.
- Never close last window (per-process) option.
- Rate limiter: cap closes/min; fall back to focusing.
- Special handling for Downloads (shell:Downloads + GUID).

Fix 1.7.0:
- Only the truly NEWER window (by firstSeenTick; tie → larger HWND) is allowed to resolve the duplicate in a scan cycle.
  This prevents the "both windows get closed" race.
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.

1 participant