Skip to content

Commit

Permalink
fix: unexpected windows error event after closing mmc.exe or WINWORD.EXE
Browse files Browse the repository at this point in the history
  • Loading branch information
fxliang committed Jul 26, 2024
1 parent 6d0be22 commit 71cd532
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions WeaselIPC/WeaselClientImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,19 +199,7 @@ LRESULT ClientImpl::_SendMessage(WEASEL_IPC_COMMAND Msg,
PipeMessage req{Msg, wParam, lParam};
LRESULT ret = 0;
switch (Msg) {
case WEASEL_IPC_SHUTDOWN_SERVER:
case WEASEL_IPC_START_SESSION:
case WEASEL_IPC_END_SESSION:
case WEASEL_IPC_START_MAINTENANCE:
case WEASEL_IPC_END_MAINTENANCE:
case WEASEL_IPC_UPDATE_INPUT_POS:
case WEASEL_IPC_FOCUS_IN:
case WEASEL_IPC_FOCUS_OUT:
case WEASEL_IPC_TRAY_COMMAND: {
ret = channel.Transact(req);
break;
}
default: {
case WEASEL_IPC_PROCESS_KEY_EVENT: {
auto future = std::async(std::launch::async, [this, &req]() {
return channel.Transact(req);
});
Expand All @@ -226,6 +214,10 @@ LRESULT ClientImpl::_SendMessage(WEASEL_IPC_COMMAND Msg,
}
break;
}
default: {
ret = channel.Transact(req);
break;
}
}
return ret;
} catch (DWORD /* ex */) {
Expand Down

0 comments on commit 71cd532

Please sign in to comment.