Skip to content

Commit

Permalink
Plugins: Disable menus for the idle process
Browse files Browse the repository at this point in the history
  • Loading branch information
dmex committed Jun 6, 2021
1 parent c7f6379 commit 39aec44
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion plugins/ExtendedTools/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,10 @@ VOID NTAPI ThreadMenuInitializingCallback(
menuItem = PhPluginCreateEMenuItem(PluginInstance, 0, ID_THREAD_CANCELIO, L"Ca&ncel I/O", threadItem);
PhInsertEMenuItem(menuInfo->Menu, menuItem, insertIndex);

if (!threadItem) menuItem->Flags |= PH_EMENU_DISABLED;
if (!threadItem)
PhSetDisabledEMenuItem(menuItem);
if (menuInfo->u.Thread.ProcessId == SYSTEM_IDLE_PROCESS_ID)
PhSetDisabledEMenuItem(menuItem);
}

VOID NTAPI ModuleMenuInitializingCallback(
Expand Down
5 changes: 4 additions & 1 deletion plugins/WindowExplorer/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ VOID NTAPI ThreadMenuInitializingCallback(
menuItem = PhPluginCreateEMenuItem(PluginInstance, 0, ID_THREAD_WINDOWS, L"&Windows", threadItem);
PhInsertEMenuItem(menuInfo->Menu, menuItem, insertIndex);

if (!threadItem) menuItem->Flags |= PH_EMENU_DISABLED;
if (!threadItem)
PhSetDisabledEMenuItem(menuItem);
if (menuInfo->u.Thread.ProcessId == SYSTEM_IDLE_PROCESS_ID)
PhSetDisabledEMenuItem(menuItem);
}

LOGICAL DllMain(
Expand Down

0 comments on commit 39aec44

Please sign in to comment.