ramensoftware / windhawk-mods

The official collection of Windhawk mods
279 stars 53 forks source link

Add Explorerframe fixes for Win11 22H2+ #864

Closed CyprinusCarpio closed 1 month ago

CyprinusCarpio commented 1 month ago

This mod fixes a couple of issues with File Explorer windows appearance in Windows 11 releases 22H2, 23H2 and 24H2.

Unpredictable menu bar appearance: On Windows 11 22H2 and 23H2, the menu bar may appear unpredictably. This mod allows the user to disable the menu bar entirely, or have it be shown at all times. You can force show/hide the menu bar in the mod settings. Forcing the menu bar to be shown is intended for the Classic theme.

Delay on navigation to a new folder when using SysListView32: this is caused by a extra erroneous message sent to the list view window. This mod supresses it, fixing the problem.

Black artifacts briefly visible in new file explorer windows under Classic theme: this is caused by incorrect handling of WM_ERASEBKGND in CabinetWClass window procedure. This mod adds a option to correct this.

Changes will be visible in new file explorer windows.

CyprinusCarpio commented 1 month ago

There seems to be some issue with the hook variable names. This check wasn't there when I last did PR's. Tried to fix it, but it seems like there's still some problem.

Anyways, so as not to clutter the Discord bot message, I'll add some more info about the mod here so it can be better considered. Classic theme users reported a few issues with file explorer window behaviour and appearance starting with Win 11 22H2, and the only available fix for that was replacing explorerframe.dll with the one from 21H2. Obviously this is less than optimal. Moreover, this mod also caters to generic 22H2 and 23H2 users, that want to get rid of the menu bar completely. For some reason the menu bar may appear when the screen resolution is changed, or randomly after some time has passed (appears to be fixed in 24H2).

The biggest concern about this mod is that it guts WM_SETREDRAW functionality for the SysListView32 in order to fix the visual delay on navigation to new folders and when opening a new window. During my testing it appears that this doesn't have any perceivable ill effects.