From 8806e4ef2e70e4916a83181d352de9f14a0cd80c Mon Sep 17 00:00:00 2001 From: Yu Leng Date: Fri, 21 Nov 2025 17:08:50 +0800 Subject: [PATCH] Remove deprecated Power Display event methods Removed `ShowPowerDisplayEvent`, `TerminatePowerDisplayEvent`, `SettingsUpdatedPowerDisplayEvent`, and `ApplyColorTemperaturePowerDisplayEvent` methods from the `Constants` class in `Constants.cpp`, `Constants.h`, and `Constants.idl`. These methods were associated with Power Display functionality that is no longer needed. This change simplifies the codebase by removing unused constants and methods related to Power Display events. --- src/common/interop/Constants.cpp | 16 ---------------- src/common/interop/Constants.h | 4 ---- src/common/interop/Constants.idl | 4 ---- 3 files changed, 24 deletions(-) diff --git a/src/common/interop/Constants.cpp b/src/common/interop/Constants.cpp index bbbf50bc5d..81977d1a78 100644 --- a/src/common/interop/Constants.cpp +++ b/src/common/interop/Constants.cpp @@ -195,26 +195,10 @@ namespace winrt::PowerToys::Interop::implementation { return CommonSharedConstants::CMDPAL_SHOW_EVENT; } - hstring Constants::ShowPowerDisplayEvent() - { - return CommonSharedConstants::SHOW_POWER_DISPLAY_EVENT; - } - hstring Constants::TerminatePowerDisplayEvent() - { - return CommonSharedConstants::TERMINATE_POWER_DISPLAY_EVENT; - } hstring Constants::RefreshPowerDisplayMonitorsEvent() { return CommonSharedConstants::REFRESH_POWER_DISPLAY_MONITORS_EVENT; } - hstring Constants::SettingsUpdatedPowerDisplayEvent() - { - return CommonSharedConstants::SETTINGS_UPDATED_POWER_DISPLAY_EVENT; - } - hstring Constants::ApplyColorTemperaturePowerDisplayEvent() - { - return CommonSharedConstants::APPLY_COLOR_TEMPERATURE_POWER_DISPLAY_EVENT; - } hstring Constants::ApplyProfilePowerDisplayEvent() { return CommonSharedConstants::APPLY_PROFILE_POWER_DISPLAY_EVENT; diff --git a/src/common/interop/Constants.h b/src/common/interop/Constants.h index 4d2b52f70a..6814afb048 100644 --- a/src/common/interop/Constants.h +++ b/src/common/interop/Constants.h @@ -52,11 +52,7 @@ namespace winrt::PowerToys::Interop::implementation static hstring WorkspacesHotkeyEvent(); static hstring PowerToysRunnerTerminateSettingsEvent(); static hstring ShowCmdPalEvent(); - static hstring ShowPowerDisplayEvent(); - static hstring TerminatePowerDisplayEvent(); static hstring RefreshPowerDisplayMonitorsEvent(); - static hstring SettingsUpdatedPowerDisplayEvent(); - static hstring ApplyColorTemperaturePowerDisplayEvent(); static hstring ApplyProfilePowerDisplayEvent(); }; } diff --git a/src/common/interop/Constants.idl b/src/common/interop/Constants.idl index ac0ffcd2f2..8b47c6a090 100644 --- a/src/common/interop/Constants.idl +++ b/src/common/interop/Constants.idl @@ -49,11 +49,7 @@ namespace PowerToys static String WorkspacesHotkeyEvent(); static String PowerToysRunnerTerminateSettingsEvent(); static String ShowCmdPalEvent(); - static String ShowPowerDisplayEvent(); - static String TerminatePowerDisplayEvent(); static String RefreshPowerDisplayMonitorsEvent(); - static String SettingsUpdatedPowerDisplayEvent(); - static String ApplyColorTemperaturePowerDisplayEvent(); static String ApplyProfilePowerDisplayEvent(); } }