From 943e46f3bd8eb4cfcf0df97218750bfc4856701c Mon Sep 17 00:00:00 2001 From: Omri Litov Date: Fri, 8 Jan 2016 00:27:53 +0200 Subject: [PATCH] Fix linux and mac build errors --- atom/browser/api/atom_api_window.cc | 6 +++--- atom/browser/native_window_mac.mm | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/atom/browser/api/atom_api_window.cc b/atom/browser/api/atom_api_window.cc index c9410d1..494d3fe 100644 --- a/atom/browser/api/atom_api_window.cc +++ b/atom/browser/api/atom_api_window.cc @@ -107,7 +107,6 @@ void TranslateOldOptions(v8::Isolate* isolate, v8::Local options) { } } -#if defined(OS_WIN) // Converts binary data to Buffer. v8::Local ToBuffer(v8::Isolate* isolate, void* val, int size) { auto buffer = node::Buffer::New(isolate, static_cast(val), size); @@ -116,7 +115,6 @@ v8::Local ToBuffer(v8::Isolate* isolate, void* val, int size) { else return buffer.ToLocalChecked(); } -#endif } // namespace @@ -596,7 +594,9 @@ void Window::SetAspectRatio(double aspect_ratio, mate::Arguments* args) { v8::Local Window::GetNativeWindowHandle() { gfx::AcceleratedWidget handle = window_->GetAcceleratedWidget(); - return ToBuffer(isolate(), static_cast(&handle), sizeof(gfx::AcceleratedWidget)); + return ToBuffer(isolate(), + static_cast(&handle), + sizeof(gfx::AcceleratedWidget)); } void Window::SetVisibleOnAllWorkspaces(bool visible) { diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index 4340677..2d75a68 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -732,7 +732,7 @@ gfx::NativeWindow NativeWindowMac::GetNativeWindow() { } gfx::AcceleratedWidget NativeWindowMac::GetAcceleratedWidget() { - return window_; + return inspectable_web_contents()->GetView()->GetNativeView(); } void NativeWindowMac::SetProgressBar(double progress) { -- 2.7.4