1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-11-23 23:21:08 +01:00

Optimize hooking of Windows key when only one monitor is connected

This commit is contained in:
Valentin-Gabriel Radu 2021-08-13 07:23:45 +03:00 committed by GitHub
parent c850e5063a
commit 65581438d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -666,7 +666,7 @@ LRESULT CALLBACK OpenStartOnCurentMonitorThreadHook(
if (code == HC_ACTION && wParam)
{
MSG* msg = (MSG*)lParam;
if (msg->message == WM_SYSCOMMAND && (msg->wParam & 0xFFF0) == SC_TASKLIST)
if (GetSystemMetrics(SM_CMONITORS) >= 2 && msg->message == WM_SYSCOMMAND && (msg->wParam & 0xFFF0) == SC_TASKLIST)
{
BOOL bShouldCheckHKLM = FALSE;
HKEY hKey;
@ -999,4 +999,4 @@ BOOL WINAPI DllMain(
break;
}
return TRUE;
}
}