From cc6a8d30b3d3ead63576b48f5b3150679684fdc1 Mon Sep 17 00:00:00 2001 From: Davide Giacometti Date: Wed, 4 Aug 2021 19:54:09 +0200 Subject: [PATCH] [Runner] Open settings when runner is elevated (#12597) --- .github/actions/spell-check/expect.txt | 1 + src/runner/tray_icon.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 1e033f54a1..6a05b919de 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -1301,6 +1301,7 @@ mscorlib msdata MSDN msedge +MSGFLT mshtmdid msi MSIFASTINSTALL diff --git a/src/runner/tray_icon.cpp b/src/runner/tray_icon.cpp index afcd82058b..97fa1952ab 100644 --- a/src/runner/tray_icon.cpp +++ b/src/runner/tray_icon.cpp @@ -246,6 +246,7 @@ void start_tray_icon() std::wstring about_msg_pt_version = L"PowerToys " + get_product_version(); wcscpy_s(tray_icon_data.szTip, sizeof(tray_icon_data.szTip) / sizeof(WCHAR), about_msg_pt_version.c_str()); tray_icon_data.uFlags = NIF_ICON | NIF_TIP | NIF_MESSAGE; + ChangeWindowMessageFilterEx(hwnd, WM_COMMAND, MSGFLT_ALLOW, nullptr); tray_icon_created = Shell_NotifyIcon(NIM_ADD, &tray_icon_data) == TRUE; }