mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[Runner] Unnecessary RegisterWindowMessage (#27728)
This commit is contained in:
@@ -16,12 +16,13 @@ namespace
|
||||
{
|
||||
HWND tray_icon_hwnd = NULL;
|
||||
|
||||
// Message code that Windows will use for tray icon notifications.
|
||||
UINT wm_icon_notify = 0;
|
||||
enum {
|
||||
wm_icon_notify = WM_APP,
|
||||
wm_run_on_main_ui_thread,
|
||||
};
|
||||
|
||||
// Contains the Windows Message for taskbar creation.
|
||||
UINT wm_taskbar_restart = 0;
|
||||
UINT wm_run_on_main_ui_thread = 0;
|
||||
|
||||
NOTIFYICONDATAW tray_icon_data;
|
||||
bool tray_icon_created = false;
|
||||
@@ -157,7 +158,6 @@ LRESULT __stdcall tray_icon_window_proc(HWND window, UINT message, WPARAM wparam
|
||||
{
|
||||
tray_icon_hwnd = window;
|
||||
wm_taskbar_restart = RegisterWindowMessageW(L"TaskbarCreated");
|
||||
wm_run_on_main_ui_thread = RegisterWindowMessage(L"RunOnMainThreadCallback");
|
||||
}
|
||||
break;
|
||||
case WM_DESTROY:
|
||||
@@ -274,7 +274,7 @@ void start_tray_icon()
|
||||
auto icon = LoadIcon(h_instance, MAKEINTRESOURCE(APPICON));
|
||||
if (icon)
|
||||
{
|
||||
UINT id_tray_icon = wm_icon_notify = RegisterWindowMessageW(L"WM_PowerToysIconNotify");
|
||||
UINT id_tray_icon = 1;
|
||||
|
||||
WNDCLASS wc = {};
|
||||
wc.hCursor = LoadCursor(nullptr, IDC_ARROW);
|
||||
|
||||
Reference in New Issue
Block a user