mayerwin / vs-customize-window-title

Customize Visual Studio Window Title - Visual Studio Extension
https://marketplace.visualstudio.com/items?itemName=mayerwin.RenameVisualStudioWindowTitle
MIT License
108 stars 30 forks source link

Minimizing/restoring VS 2022 window via task bar not working #67

Closed KernelLeak closed 2 years ago

KernelLeak commented 2 years ago

Hi,

I just installed your release for VS 2022.

It basically works the same as it did in VS 2019, but there's one thing I couldn't get to work:

Minimizing the main window, and then clicking on the task bar entry to restore it does nothing, and neither does alt-tabbing to it - the only way I can bring back the window once it's minimized is hovering over the VS 2022 task bar entry so the window previews appear, then right clicking on the main window's preview and choosing "Restore" from the context menu.

Moreover, nothing is happening as well if I try to click on the task bar entry when the window has focus to minimize it.

I've verified that the latest build for VS 2019 works fine on the same machine, and neither toggling the compact mode support or messing with the appended string helps - but as soon as I disable the extension and restart VS 2022, minimizing/restoring the window works as it should.

(This is on a machine running Windows Server 2016 Standard.)

mayerwin commented 2 years ago

Thanks for this report, I also noticed this behavior recently (on Windows 10, VS 2022), but I haven't installed the latest version of the extension myself yet (it was only loaded on the Experimental Instance when developing it), so it can't be due to the compact mode support.

It isn't systematic, most of the time it works fine. Are you sure you're not seeing the issue when the extension is disabled (and it might be an issue with Visual Studio)?

If Compact mode support is disabled, the extension really does absolutely nothing. See: https://github.com/mayerwin/vs-customize-window-title/blob/fdb8dd2137cdcbb3fca4698462dd216356694d0c/CustomizeVSWindowTitleShared/CustomizeVSWindowTitlePackage.cs#L408 And even when it does something, it only calls FindChild to locate the compact title element once per Visual Studio launch, and then just changes a text value.

mayerwin commented 2 years ago

I am able to consistently replicate the issue (the key step is to specifically minimize the window before trying to open it again), and even after disabling the extension and relaunching Visual Studio it persists, so it looks like a Visual Studio issue unfortunately.

mayerwin commented 2 years ago

Also see this: https://developercommunity.visualstudio.com/t/cannot-see-visual-studio-2022-window/1674481 https://stackoverflow.com/questions/71177450/unable-to-restore-visual-studio-2022-window-ide-itself-after-minimizing

So it indeed looks like a regression from Visual Studio.

KernelLeak commented 2 years ago

Well, for what it's worth - I found that I could keep on clicking on the task bar entry for a minute with your extension disabled, but it seemed to happen consistently with it enabled, as soon as the window title got rewritten... and I haven't managed to reproduce this without your extension yet, but could easily do it with it enabled...