Browse Source

Optimize hooking of Windows key when only one monitor is connected

pull/20/head
Valentin-Gabriel Radu 5 years ago committed by GitHub
parent
commit
65581438d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ExplorerPatcherLibrary/dllmain.c

2
ExplorerPatcherLibrary/dllmain.c

@ -666,7 +666,7 @@ LRESULT CALLBACK OpenStartOnCurentMonitorThreadHook( @@ -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;

Loading…
Cancel
Save