MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / ToggleSuspendState

Method ToggleSuspendState

source/script.cpp:12451–12462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12449
12450
12451void Line::ToggleSuspendState()
12452{
12453 // If suspension is being turned on:
12454 // It seems unnecessary, and possibly undesirable, to purge any pending hotkey msgs from the msg queue.
12455 // Even if there are some, it's possible that they are exempt from suspension so we wouldn't want to
12456 // globally purge all messages anyway.
12457 g_IsSuspended = !g_IsSuspended;
12458 Hotstring::SuspendAll(g_IsSuspended); // Must do this prior to ManifestAllHotkeysHotstringsHooks() to avoid incorrect removal of hook.
12459 Hotkey::ManifestAllHotkeysHotstringsHooks(); // Update the state of all hotkeys based on the complex interdependencies hotkeys have with each another.
12460 g_script.UpdateTrayIcon();
12461 CheckMenuItem(GetMenu(g_hWnd), ID_FILE_SUSPEND, g_IsSuspended ? MF_CHECKED : MF_UNCHECKED);
12462}
12463
12464
12465

Callers

nothing calls this directly

Calls 1

UpdateTrayIconMethod · 0.80

Tested by

no test coverage detected