fix: revert macOS content protection logic refactor (#46889)
Revert "refactor: use upstream content protection logic on macOS (#46813)"
This reverts commit 34adb976b6
.
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
This commit is contained in:
parent
ec4eafecae
commit
621c6b4148
6 changed files with 30 additions and 17 deletions
|
@ -1171,6 +1171,15 @@ void NativeWindowMac::SetIgnoreMouseEvents(bool ignore, bool forward) {
|
|||
}
|
||||
}
|
||||
|
||||
void NativeWindowMac::SetContentProtection(bool enable) {
|
||||
[window_
|
||||
setSharingType:enable ? NSWindowSharingNone : NSWindowSharingReadOnly];
|
||||
}
|
||||
|
||||
bool NativeWindowMac::IsContentProtected() const {
|
||||
return [window_ sharingType] == NSWindowSharingNone;
|
||||
}
|
||||
|
||||
void NativeWindowMac::SetFocusable(bool focusable) {
|
||||
// No known way to unfocus the window if it had the focus. Here we do not
|
||||
// want to call Focus(false) because it moves the window to the back, i.e.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue