Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / ui / views / widget / desktop_aura / desktop_screen_x11.cc
index f4c03da..083e900 100644 (file)
@@ -112,10 +112,6 @@ DesktopScreenX11::~DesktopScreenX11() {
 ////////////////////////////////////////////////////////////////////////////////
 // DesktopScreenX11, gfx::Screen implementation:
 
-bool DesktopScreenX11::IsDIPEnabled() {
-  return true;
-}
-
 gfx::Point DesktopScreenX11::GetCursorScreenPoint() {
   TRACE_EVENT0("views", "DesktopScreenX11::GetCursorScreenPoint()");
 
@@ -157,6 +153,9 @@ std::vector<gfx::Display> DesktopScreenX11::GetAllDisplays() const {
 
 gfx::Display DesktopScreenX11::GetDisplayNearestWindow(
     gfx::NativeView window) const {
+  if (!window)
+    return GetPrimaryDisplay();
+
   // Getting screen bounds here safely is hard.
   //
   // You'd think we'd be able to just call window->GetBoundsInScreen(), but we