mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-08 23:14:20 +08:00
If the server manages to detect ctrl+alt+del it will no longer send
that to the client. If it did then the user could see the effect of ctrl+alt+del on both the server and client which we never want. The user can use ctrl+alt+pause to emulate ctrl+alt+del on the client.
This commit is contained in:
@@ -950,8 +950,15 @@ CMSWindowsScreen::onKey(WPARAM wParam, LPARAM lParam)
|
||||
|
||||
// ignore message if posted prior to last mark change
|
||||
if (!ignore()) {
|
||||
// check for ctrl+alt+del emulation
|
||||
// check for ctrl+alt+del. we do not want to pass that to the
|
||||
// client. the user can use ctrl+alt+pause to emulate it.
|
||||
UINT virtKey = (wParam & 0xffu);
|
||||
if (virtKey == VK_DELETE && ctrlAlt) {
|
||||
LOG((CLOG_DEBUG "discard ctrl+alt+del"));
|
||||
return true;
|
||||
}
|
||||
|
||||
// check for ctrl+alt+del emulation
|
||||
if ((virtKey == VK_PAUSE || virtKey == VK_CANCEL) && ctrlAlt) {
|
||||
LOG((CLOG_DEBUG "emulate ctrl+alt+del"));
|
||||
// switch wParam and lParam to be as if VK_DELETE was
|
||||
|
||||
Reference in New Issue
Block a user