diff --git a/atom/browser/api/atom_api_menu_views.cc b/atom/browser/api/atom_api_menu_views.cc index 4d1c902e17..9340bc7673 100644 --- a/atom/browser/api/atom_api_menu_views.cc +++ b/atom/browser/api/atom_api_menu_views.cc @@ -30,7 +30,7 @@ void MenuViews::PopupAt(Window* window, int x, int y, int positioning_item) { // (-1, -1) means showing on mouse location. gfx::Point location; if (x == -1 || y == -1) { - location = gfx::Screen::GetNativeScreen()->GetCursorScreenPoint(); + location = gfx::Screen::GetScreen()->GetCursorScreenPoint(); } else { gfx::Point origin = view->GetViewBounds().origin(); location = gfx::Point(origin.x() + x, origin.y() + y); diff --git a/atom/browser/api/atom_api_screen.cc b/atom/browser/api/atom_api_screen.cc index 9d845e390e..425d906e28 100644 --- a/atom/browser/api/atom_api_screen.cc +++ b/atom/browser/api/atom_api_screen.cc @@ -99,7 +99,7 @@ v8::Local Screen::Create(v8::Isolate* isolate) { return v8::Null(isolate); } - gfx::Screen* screen = gfx::Screen::GetNativeScreen(); + gfx::Screen* screen = gfx::Screen::GetScreen(); if (!screen) { isolate->ThrowException(v8::Exception::Error(mate::StringToV8( isolate, "Failed to get screen information"))); diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index 6986c680fa..a5abc56f89 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -318,9 +318,9 @@ void NativeWindow::CapturePage(const gfx::Rect& rect, // current system, increase the requested bitmap size to capture it all. gfx::Size bitmap_size = view_size; const gfx::NativeView native_view = view->GetNativeView(); - gfx::Screen* const screen = gfx::Screen::GetScreenFor(native_view); const float scale = - screen->GetDisplayNearestWindow(native_view).device_scale_factor(); + gfx::Screen::GetScreen()->GetDisplayNearestWindow(native_view) + .device_scale_factor(); if (scale > 1.0f) bitmap_size = gfx::ScaleToCeiledSize(view_size, scale); diff --git a/atom/browser/ui/win/notify_icon.cc b/atom/browser/ui/win/notify_icon.cc index 1124730138..464dc144ba 100644 --- a/atom/browser/ui/win/notify_icon.cc +++ b/atom/browser/ui/win/notify_icon.cc @@ -155,7 +155,7 @@ void NotifyIcon::PopUpContextMenu(const gfx::Point& pos, // Show menu at mouse's position by default. gfx::Rect rect(pos, gfx::Size()); if (pos.IsOrigin()) - rect.set_origin(gfx::Screen::GetNativeScreen()->GetCursorScreenPoint()); + rect.set_origin(gfx::Screen::GetScreen()->GetCursorScreenPoint()); views::MenuRunner menu_runner( menu_model,