diff --git a/src/modules/fancyzones/dll/dllmain.cpp b/src/modules/fancyzones/dll/dllmain.cpp index 1358c5ed1c5c..d2889ad1a378 100644 --- a/src/modules/fancyzones/dll/dllmain.cpp +++ b/src/modules/fancyzones/dll/dllmain.cpp @@ -144,6 +144,7 @@ class FancyZonesModule : public PowertoyModuleIface } m_app->Destroy(); m_app = nullptr; + m_settings->ResetCallback(); } } diff --git a/src/modules/fancyzones/lib/Settings.cpp b/src/modules/fancyzones/lib/Settings.cpp index f1bd179fa875..e7a8cb86915d 100644 --- a/src/modules/fancyzones/lib/Settings.cpp +++ b/src/modules/fancyzones/lib/Settings.cpp @@ -15,6 +15,7 @@ struct FancyZonesSettings : winrt::implementsset_delay(*press_delay_time); + pressTime.value = *press_delay_time; + if (target_state) + { + target_state->set_delay(*press_delay_time); + } } - } - if (const auto overlay_opacity = _values.get_int_value(overlayOpacity.name)) - { - overlayOpacity.value = *overlay_opacity; - if (winkey_popup) + if (const auto overlay_opacity = _values.get_int_value(overlayOpacity.name)) { - winkey_popup->apply_overlay_opacity(((float)overlayOpacity.value) / 100.0f); + overlayOpacity.value = *overlay_opacity; + if (winkey_popup) + { + winkey_popup->apply_overlay_opacity(((float)overlayOpacity.value) / 100.0f); + } + } + if (auto val = _values.get_string_value(theme.name)) + { + theme.value = std::move(*val); + if (winkey_popup) + { + winkey_popup->set_theme(theme.value); + } } } - if (auto val = _values.get_string_value(theme.name)) - { - theme.value = std::move(*val); - winkey_popup->set_theme(theme.value); - } - _values.save_to_settings_file(); - Trace::SettingsChanged(pressTime.value, overlayOpacity.value, theme.value); } catch (...) {