MCPcopy Create free account
hub / github.com/ConEmu/ConEmu / ProcessMessage

Function ProcessMessage

src/ConEmu/ConEmuApp.cpp:1013–1110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1011}
1012
1013bool ProcessMessage(MSG& Msg)
1014{
1015 bool bRc = true;
1016 static bool bQuitMsg = false;
1017 static MSG MouseClickPatch = {};
1018
1019 #ifdef _DEBUG
1020 static DWORD LastInsideCheck = 0;
1021 const DWORD DeltaInsideCheck = 1000;
1022 #endif
1023
1024 MSetter nestedLevel(&gnMessageNestingLevel);
1025
1026 gnLastMsgTick = GetTickCount();
1027
1028 if (Msg.message == WM_QUIT)
1029 {
1030 bQuitMsg = true;
1031 bRc = false;
1032 goto wrap;
1033 }
1034
1035 // Do minimal in-memory logging (small circular buffer)
1036 ConEmuMsgLogger::Log(Msg, ConEmuMsgLogger::msgCommon);
1037
1038 if (gpConEmu)
1039 {
1040 #ifdef _DEBUG
1041 if (gpConEmu->mp_Inside)
1042 {
1043 DWORD nCurTick = GetTickCount();
1044 if (!LastInsideCheck)
1045 {
1046 LastInsideCheck = nCurTick;
1047 }
1048 else if ((LastInsideCheck - nCurTick) >= DeltaInsideCheck)
1049 {
1050 if (gpConEmu->isInsideInvalid())
1051 {
1052 // Show assertion once
1053 static bool bWarned = false;
1054 if (!bWarned)
1055 {
1056 bWarned = true;
1057 _ASSERTE(FALSE && "Parent was terminated, but ConEmu wasn't");
1058 }
1059 }
1060 LastInsideCheck = nCurTick;
1061 }
1062 }
1063 #endif
1064
1065 if (gpConEmu->isDialogMessage(Msg))
1066 goto wrap;
1067
1068 switch (Msg.message)
1069 {
1070 case WM_SYSCOMMAND:

Callers 4

MessageLoopFunction · 0.70
SleepMethod · 0.70
CreateConGroupMethod · 0.70
OnKeyboardMethod · 0.70

Calls 6

PtMouseDblClickTestFunction · 0.85
isInsideInvalidMethod · 0.80
isSkipNcMessageMethod · 0.80
OnWmHotkeyMethod · 0.80
LogFunction · 0.70
isDialogMessageMethod · 0.45

Tested by

no test coverage detected