Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unexpected windows error event after closing mmc.exe or WINWORD.EXE #1338

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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