Skip to content

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

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

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>
Lemxy added a commit that referenced this pull request Nov 26, 2026
@Lemxy

Lemxy commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Thank you, @GuilhermeProvenci! Your change is in main (squashed, credited in the commit message) and released in v0.5.9.

@Lemxy Lemxy closed this Nov 26, 2026
Lemxy added a commit that referenced this pull request Nov 26, 2026
…#182

Co-authored-by: 2sulraw <2sulraw@gmail.com>
Co-authored-by: Tkyo0x <240800669+Tkyoxx@users.noreply.github.com>
Co-authored-by: GuilhermeLima <guilhermelimamp2020@gmail.com>
RexxColder pushed a commit to RexxColder/WinRust that referenced this pull request Nov 26, 2026
…lone Win no longer opens Windows' Start

Ported from upstream ca8db36 (Lemxy#168) and 7a02534 (Lemxy#182):

- rust-explorer's windows belong to the File Explorer pin when there is
  one: that pin is what the user clicks to open Explorer here, and only
  explorer.exe matched it, so its button never showed them (a minimized
  window looked gone and clicking started a second one).
- A lone Win release opened Windows' own Start on top of ours: the E8
  sent from the hook was queued behind the release, so the shell
  sometimes saw no other key. The release is swallowed now and the shell
  gets an E8 plus a synthetic Win-up.
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.

2 participants