From baeabe8979db09b94b9b9469bd3e65e4aee367db Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Sun, 12 Dec 2021 15:54:36 +0200 Subject: [PATCH] Mitigation for certain Explorer crashes at startup --- ExplorerPatcher/dllmain.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index 81df829..b92ec9d 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -3465,6 +3465,17 @@ DWORD WindowSwitcher(DWORD unused) while (TRUE) { //Sleep(5000); + while (!FindWindowExW( + NULL, + NULL, + L"Shell_TrayWnd", + NULL + )) + { + printf("[sws] Waiting for taskbar...\n"); + Sleep(100); + } + Sleep(100); sws_ReadSettings(NULL); if (sws_IsEnabled) {