mirror of
https://github.com/electron/electron.git
synced 2026-02-15 17:45:33 -05:00
mac: Call SetBackgroundOpaque in BrowserWindow
This commit is contained in:
@@ -1116,8 +1116,17 @@ void BrowserWindow::AddTabbedWindow(NativeWindow* window,
|
||||
|
||||
void BrowserWindow::SetVibrancy(mate::Arguments* args) {
|
||||
std::string type;
|
||||
|
||||
args->GetNext(&type);
|
||||
|
||||
auto* render_view_host = web_contents()->GetRenderViewHost();
|
||||
if (render_view_host) {
|
||||
auto* impl = content::RenderWidgetHostImpl::FromID(
|
||||
render_view_host->GetProcess()->GetID(),
|
||||
render_view_host->GetRoutingID());
|
||||
if (impl)
|
||||
impl->SetBackgroundOpaque(type.empty() ? !window_->transparent() : false);
|
||||
}
|
||||
|
||||
window_->SetVibrancy(type);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user