Add BrowserWindow.prototype.setContentProtection(enable)
This commit is contained in:
parent
fd40f3d344
commit
c243cf0c0f
8 changed files with 28 additions and 0 deletions
|
@ -728,6 +728,13 @@ void NativeWindowViews::SetIgnoreMouseEvents(bool ignore) {
|
|||
#endif
|
||||
}
|
||||
|
||||
void NativeWindowViews::SetContentProtection(bool enable) {
|
||||
#if defined(OS_WIN)
|
||||
DWORD affinity = enable ? WDA_MONITOR : WDA_NONE;
|
||||
::SetWindowDisplayAffinity(GetAcceleratedWidget(), affinity);
|
||||
#endif
|
||||
}
|
||||
|
||||
void NativeWindowViews::SetFocusable(bool focusable) {
|
||||
#if defined(OS_WIN)
|
||||
LONG ex_style = ::GetWindowLong(GetAcceleratedWidget(), GWL_EXSTYLE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue