Skip to content

Commit

Permalink
fix: [mac] restore SetBackgroundColor functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
nornagon committed Oct 9, 2018
1 parent 32042df commit c33c050
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions atom/browser/native_window_mac.mm
Expand Up @@ -997,20 +997,15 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) {
}

void NativeWindowMac::SetBackgroundColor(SkColor color) {
NOTIMPLEMENTED() << "TODO";
/*
base::ScopedCFTypeRef<CGColorRef> cgcolor(
skia::CGColorCreateFromSkColor(color));
// views::Widget adds a layer for the content view.
auto* bridge = views::NativeWidgetMac::GetBridgeForNativeWindow(window_);
NSView* compositor_superview =
static_cast<ui::AcceleratedWidgetMacNSView*>(bridge)
->AcceleratedWidgetGetNSView();
auto* compositor_superview = bridge->ns_view();
[[compositor_superview layer] setBackgroundColor:cgcolor];
// When using WebContents as content view, the contentView also has layer.
if ([[window_ contentView] wantsLayer])
[[[window_ contentView] layer] setBackgroundColor:cgcolor];
*/
}

void NativeWindowMac::SetHasShadow(bool has_shadow) {
Expand Down

0 comments on commit c33c050

Please sign in to comment.