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

Unified Diff: ui/views/widget/desktop_aura/desktop_screen_position_client.cc

Issue 2583873002: Correctly update the popup window position (Closed)
Patch Set: . Created 4 years 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
Index: ui/views/widget/desktop_aura/desktop_screen_position_client.cc
diff --git a/ui/views/widget/desktop_aura/desktop_screen_position_client.cc b/ui/views/widget/desktop_aura/desktop_screen_position_client.cc
index 6096b4e10797dd8fa0a299c5db14e4b3ca5040be..512a972eff8b032f902eb911f598b9e0f2ed5b3a 100644
--- a/ui/views/widget/desktop_aura/desktop_screen_position_client.cc
+++ b/ui/views/widget/desktop_aura/desktop_screen_position_client.cc
@@ -45,6 +45,11 @@ void DesktopScreenPositionClient::SetBounds(aura::Window* window,
DCHECK(!desktop_native_widget ||
desktop_native_widget->GetNativeView() != window);
+ if (window->IsRootWindow()) {
+ desktop_native_widget->GetWidget()->SetBounds(bounds);
+ return;
+ }
+
if (PositionWindowInScreenCoordinates(window)) {
// The caller expects windows we consider "embedded" to be placed in the
// screen coordinate system. So we need to offset the root window's

Powered by Google App Engine
This is Rietveld 408576698