uxtheme: Save temporary system metrics to a struct in memory.
commitaefcd057b1a85c159b1e3bdc2bb6f77f9d77f670
authorZhiyi Zhang <zzhang@codeweavers.com>
Thu, 21 Oct 2021 02:06:16 +0000 (21 10:06 +0800)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 21 Oct 2021 09:20:29 +0000 (21 11:20 +0200)
tree33a7b1ab6a5bab929f9a57609e9aa9c52c3c7d90
parentf712a98d12d091c5437159a291857dfb9f0cea7c
uxtheme: Save temporary system metrics to a struct in memory.

So that temporary system metrics are not saved in the registry. Saving
them to the registry creates a race condition when two processes are
trying to activate theming at the same time, one process might save
themed system metrics instead of unthemed system metrics to the registry.
The race condition will be more apparent when initializing a wine prefix
after theming is turned on by default in wine.inf.

This patch refactors the system metric helper functions to use an
in-memory struct and is a prerequisite to remove the race condition.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/uxtheme/system.c