Skip to content

rs-shell: end Explorer only once it stops starting the autostart (#159) - #161

Closed
Tkyoxx wants to merge 1 commit into
Lemxy:mainfrom
Tkyoxx:pr/17-autostart-wait
Closed

Tkyoxx wants to merge 1 commit into
Lemxy:mainfrom
Tkyoxx:pr/17-autostart-wait

Conversation

@Tkyoxx

@Tkyoxx Tkyoxx commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Likely cause of #159 (startup programs do not run with WinRust on).

What

With "Replace Explorer" on, rs-shell --overlay ends the shell Explorer once RunStuffHasBeenRun and StartupHasBeenRun exist under Explorer\SessionInfo\<session>. Explorer writes each of those keys just before its pass, and then starts the programs one at a time. Ending it at that point loses every program it has not reached yet.

Measured on a Windows 10 21H2 sign-in, with Explorer as the shell. Key times come from the keys' last-write time and app times from the process creation time; all are seconds after explorer.exe started:

s
RunStuffHasBeenRun written 8.2
Run key apps started by Explorer 8.8, 9.8, 12.1
a Store app's startup task 14.2
StartupHasBeenRun written 18.2
the Startup folder shortcut's app 18.2 (34 ms later)

The overlay checks every 3 s, so with both keys present it ended Explorer 0–3 s into the Startup folder pass. The same PC's overlay log from an earlier sign-in shows autostart done (markers: true, after 9 s).

Fix

The overlay also watches what the shell Explorer has started, using its child processes. That covers Startup folder shortcuts and Store startup tasks too, which we cannot name in advance. may_end_explorer now also requires 8 s without a new one. This applies to the markers path, the "everything we expect is running" path and the 90 s grace. On the timeline above, Explorer now goes about 8–11 s after the last program it starts instead of during the pass.

winrust_common::proc gets children(parents), which reuses the snapshot loop of list() (moved into each()).

Test

  • cargo test -p rs-shell: waits_while_explorer_still_starts_programs and notices_each_program_explorer_starts, plus the existing may_end_explorer cases.
  • cargo test -p winrust-common: lists_the_children_of_a_process.
  • cargo test --workspace and cargo check --workspace --all-targets are clean.
  • Not yet run through a real sign-in with "Replace Explorer" on.

…xy#159)

With "Replace Explorer" on, the overlay ended the shell Explorer as soon as
RunStuffHasBeenRun and StartupHasBeenRun existed. Explorer writes each marker
just before its pass, not after it, and then starts the programs one by one,
so anything it had not reached yet never started.

The overlay now also watches what the shell Explorer starts (its child
processes, which covers Startup folder shortcuts and Store apps' startup
tasks) and ends it only after 8 s without a new one.
Lemxy added a commit that referenced this pull request Nov 26, 2026
Fixes: Alt+Tab ignores a still pointer (#183, #116); Performance page details visible in a narrow window (#170); type-ahead in rust-explorer (#130, from PR #167 by GuilhermeProvenci); rs-shell waits for the autostart before ending Explorer (#159, from PR #161 by Tkyoxx); WinRust is listed in Installed apps (#178).

New: quick settings tiles for Mobile hotspot, Night light, Project and a media card (#176, #166); Restart / Shut down on the bar (#173); Win+V clipboard history (#171); window magnet (#133); folder sizes (#147), double click on empty space goes up (#139), "Folders first" switch and a Sort by menu (#162).
@Lemxy

Lemxy commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Thank you, @Tkyoxx! 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>
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