microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.23k stars 808 forks source link

Win32 apps launched via interop lack taskbar icons in Win11 #7645

Closed 0xabu closed 7 months ago

0xabu commented 2 years ago

Version

Microsoft Windows [Version 10.0.22000.282]

WSL Version

Repro Steps

Since updating to Windows 11, I've noticed that Win32 applications launched from WSL via interop lack their usual taskbar icons.

(It could be argued that this is a regression in the taskbar, but it's also somehow unique to WSL and I didn't already see it reported here.)

Expected Behavior

When launching an app from cmd.exe:

C:\Users\me\AppData\Local\SumatraPDF>SumatraPDF.exe

Taskbar shows as normal: image

Actual Behavior

When launching the same exe in the same directory via WSL interop:

 ~/AppData/Local/SumatraPDF $ ./SumatraPDF.exe

Taskbar shows: image

Diagnostic Logs

No response

0xabu commented 2 years ago

Confirmed repro in WSL2, and updated description.

benhillis commented 2 years ago

@0xabu - no repro for me on 22489 or 22000, I tried notepad.exe, explorer.exe, and vscode.

0xabu commented 2 years ago

@benhillis I think it needs to be a standalone exe. Try msinfo32.exe

0xabu commented 2 years ago

I'm guessing the others you tried are all special, in that the exe you run from interop isn't directly responsible for the window that appears. (notepad surprises me, but I see the same thing.)

benhillis commented 2 years ago

msinfo32.exe also works.

benhillis commented 2 years ago

In any case, we're just calling CreateProcess, nothing special. Smells like a shell bug.

0xabu commented 2 years ago

Really? Huh. It's 100% reliable repro for me on 22000.282

image

Left is msinfo32.exe via interop, right is from cmd.

0xabu commented 2 years ago

I filed a feedback bug against taskbar: https://aka.ms/AAerscz

benhillis commented 2 years ago

My test machine is on 22000.194, I'll install updates and try again.

benhillis commented 2 years ago

No repro on 22000.258 rebooting again ;)

0xabu commented 2 years ago

Also no repro on a different user's 22000.258. It may be something about my taskbar, or it may be .282

benhillis commented 2 years ago

No repro for me on .282 either, strange.

benhillis commented 2 years ago

Maybe your icon cache is corrupted?

0xabu commented 2 years ago

I tried another machine I had handy, where I went through a similar set of upgrade steps to Win11 then .282, with no repro before or after the .282 update. So it's something about this specific machine/config. (I also tried clearing the icon cache and restarting explorer, with no changes.)

0xabu commented 2 years ago

Since a recent update, apps are now appearing with the new WSL logo: image

I've also noticed that unrelated win32 apps launched from WSL are all grouped together on the taskbar as one group, so it seems to be picking up the WSL launcher process and using that for the taskbar icons. The mystery of why it repros only on one device remains, however.

microsoft-github-policy-service[bot] commented 7 months ago

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!