Skip to content

Commit fa19402

Browse files
committed
SettingsMonitor: There is a bug in Explorer windows where WM_SETTINGCHANGE would scroll the ItemsView to the top, we minimize the damage due to this by pinpointing the WM_SETTINGCHANGE message to taskbar window.
1 parent 66818fe commit fa19402

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

ExplorerPatcher/dllmain.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6714,7 +6714,11 @@ void WINAPI LoadSettings(LPARAM lParam)
67146714
}
67156715
if ((dwRefreshUIMask & REFRESHUI_ORB) || (dwRefreshUIMask & REFRESHUI_PEOPLE))
67166716
{
6717-
SendNotifyMessageW(HWND_BROADCAST, WM_WININICHANGE, 0, (LPARAM)L"TraySettings");
6717+
HWND hwndTray = FindWindowW(L"Shell_TrayWnd", NULL);
6718+
if (hwndTray)
6719+
{
6720+
SendMessageW(hwndTray, WM_WININICHANGE, 0, (LPARAM)L"TraySettings");
6721+
}
67186722
if (dwRefreshUIMask & REFRESHUI_ORB)
67196723
{
67206724
InvalidateRect(FindWindowW(L"ExplorerPatcher_GUI_" _T(EP_CLSID), NULL), NULL, FALSE);
@@ -6954,7 +6958,11 @@ void WINAPI Explorer_RefreshUI(int src)
69546958
}
69556959
}
69566960
if (src == 99) return;
6957-
SendNotifyMessageW(HWND_BROADCAST, WM_WININICHANGE, 0, (LPARAM)L"TraySettings");
6961+
HWND hwndTray = FindWindowW(L"Shell_TrayWnd", NULL);
6962+
if (hwndTray)
6963+
{
6964+
SendMessageW(hwndTray, WM_WININICHANGE, 0, (LPARAM)L"TraySettings");
6965+
}
69586966
Explorer_RefreshClock(0);
69596967
if (dwRefreshMask & REFRESHUI_CENTER)
69606968
{

0 commit comments

Comments
 (0)