Skip to content

topbar: the file manager's windows belong to the File Explorer pin - #168

Draft
GuilhermeProvenci wants to merge 1 commit into
Lemxy:mainfrom
GuilhermeProvenci:fix/topbar-file-explorer-pin
Draft

GuilhermeProvenci wants to merge 1 commit into
Lemxy:mainfrom
GuilhermeProvenci:fix/topbar-file-explorer-pin

Conversation

@GuilhermeProvenci

Copy link
Copy Markdown
Contributor

Problem. With rust-explorer installed and the File Explorer pin on the bar: open a folder, minimize it, and the File Explorer button no longer shows a window. Clicking it starts a second window instead of bringing the first back.

Cause. refresh_buttons matches windows to pins by exe. The File Explorer pin has no target, so its exe comes from the icon location (%windir%\explorer.exe), but the windows are rust-explorer.exe. They go to the separate Rust-explorer pin (or to no pin), and the File Explorer button never has a window.

Fix. When a File Explorer pin exists, windows of rust-explorer.exe are matched as explorer.exe, so they belong to it. Without such a pin nothing changes. as_pinned_exe is a pure function with a unit test.

Test. cargo test -p topbar passes. I checked the cause on a real setup (the two pins, their targets and the window's exe). I have not watched the fixed bar run, so this is a draft until that is done. Not tested: two pins of rust-explorer at once, or a user who unpinned File Explorer after the marker file was written.

🤖 Generated with Claude Code

refresh_buttons matches windows to pins by exe. The File Explorer pin takes explorer.exe from its icon location, but the
windows on a WinRust machine are rust-explorer.exe, so they went to another pin (or none) and the File Explorer button never
showed them: a minimized window looked gone and a click started a second one. With a File Explorer pin they now go to it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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