Don't poll for changes in HKEY_CURRENT_USER, but only for VirtualDesktops reg key. (#2496)

This commit is contained in:
vldmr11080 2020-04-30 00:10:53 +02:00 committed by GitHub
parent 8db1eb69dc
commit 2d23952181
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1123,7 +1123,7 @@ void FancyZones::HandleVirtualDesktopUpdates(HANDLE fancyZonesDestroyedEvent) no
HANDLE events[2] = { regKeyEvent, fancyZonesDestroyedEvent }; HANDLE events[2] = { regKeyEvent, fancyZonesDestroyedEvent };
while (1) while (1)
{ {
if (RegNotifyChangeKeyValue(HKEY_CURRENT_USER, TRUE, REG_NOTIFY_CHANGE_LAST_SET, regKeyEvent, TRUE) != ERROR_SUCCESS) if (RegNotifyChangeKeyValue(m_virtualDesktopsRegKey, TRUE, REG_NOTIFY_CHANGE_LAST_SET, regKeyEvent, TRUE) != ERROR_SUCCESS)
{ {
return; return;
} }