Skip to content
Open
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
4 changes: 3 additions & 1 deletion src/platform/win/winplatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ bool WinPlatform::setPreventScreenCapture(WId winId, bool prevent)
// Remote desktop clients are screen capture systems — applying
// WDA_EXCLUDEFROMCAPTURE makes windows invisible to the remote viewer.
if (prevent && GetSystemMetrics(SM_REMOTESESSION)) {
if (!SetWindowDisplayAffinity(window, WDA_NONE))
log("Failed to clear display affinity in remote session", LogWarning);

static bool logged = false;
if (!logged) {
logged = true;
Expand All @@ -317,7 +320,6 @@ bool WinPlatform::setPreventScreenCapture(WId winId, bool prevent)
}
}

SetWindowDisplayAffinity(window, WDA_NONE);
return false;
}

Expand Down
Loading