Fix for Classic theme metrics on 24H2, 25H2, 26H2 builds 9444+
Syncs WindowMetrics of current user with default user at theme change and logon.
Author: Anixx
This mod is intended to workaround the bug with broken titlebar and scrollbar buttons in Classic theme on Windows 11 24H2, 25H2, 26H2 with build number 9444 and newer or version 26H1. If you are on build 8875 or below, you do not need this mod.
On the newest builds of Windows Microsoft broke the very core of its operating system, the essential part of the kernel,
the module win32k.sys. This led to the titlebar buttons and scrollbars in unthemed applications being broken.
How it works? On the affected build the actual size of the titlebar and scrollbar buttons is taken from the user's registry
section, while their visible size is takes from the default user. This makes the buttons to be painted with different size than their actual size, creating garbage and visual glitches.
This mod copies the user's window metrics data from the current user (HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics) to the default user (HKEY_USERS.DEFAULT\Control Panel\Desktop\WindowMetrics) upon theme change, thus
forcing them being in sync.
Unfortunately, the values from the default user's registry are read only once during the login screen. This makes it impossible to intercept the query during the interactive user's session.
After a theme change, re-login for the changes to take effect.
Before mod:

After mod:
