Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Unified Diff: components/exo/display.cc

Issue 2040743002: exo: Implement version 2 of remote shell interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remote-shell-version-2
Patch Set: popup placement fix Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/exo/pointer_unittest.cc » ('j') | components/exo/wayland/server.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/display.cc
diff --git a/components/exo/display.cc b/components/exo/display.cc
index c9fcc612a0ba8c1998d92a6decb3d5d76724347c..be353fb56b65c93ca3754dd15f481b768fa6999c 100644
--- a/components/exo/display.cc
+++ b/components/exo/display.cc
@@ -109,9 +109,9 @@ std::unique_ptr<ShellSurface> Display::CreateShellSurface(Surface* surface) {
return nullptr;
}
- return base::WrapUnique(new ShellSurface(
- surface, nullptr, gfx::Rect(), true /* activatable */,
- true /* resizeable */, ash::kShellWindowId_DefaultContainer));
+ return base::WrapUnique(
+ new ShellSurface(surface, nullptr, gfx::Rect(), true /* activatable */,
+ ash::kShellWindowId_DefaultContainer));
}
std::unique_ptr<ShellSurface> Display::CreatePopupShellSurface(
@@ -131,9 +131,16 @@ std::unique_ptr<ShellSurface> Display::CreatePopupShellSurface(
return nullptr;
}
+ // Determine the initial bounds for popup. |position| is relative to the
+ // parent's main surface origin and initial bounds are relative to the
+ // container origin.
+ gfx::Rect initial_bounds(position, gfx::Size(1, 1));
+ aura::Window::ConvertRectToTarget(
+ ShellSurface::GetMainSurface(parent->GetWidget()->GetNativeWindow()),
+ parent->GetWidget()->GetNativeWindow()->parent(), &initial_bounds);
+
return base::WrapUnique(
- new ShellSurface(surface, parent, gfx::Rect(position, gfx::Size(1, 1)),
- false /* activatable */, true /* resizeable */,
+ new ShellSurface(surface, parent, initial_bounds, false /* activatable */,
ash::kShellWindowId_DefaultContainer));
}
@@ -149,8 +156,7 @@ std::unique_ptr<ShellSurface> Display::CreateRemoteShellSurface(
}
return base::WrapUnique(new ShellSurface(surface, nullptr, gfx::Rect(1, 1),
- true /* activatable */,
- false /* resizeable */, container));
+ true /* activatable */, container));
}
std::unique_ptr<SubSurface> Display::CreateSubSurface(Surface* surface,
« no previous file with comments | « no previous file | components/exo/pointer_unittest.cc » ('j') | components/exo/wayland/server.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698