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

Unified Diff: ui/views/bubble/bubble_delegate.cc

Issue 1214933006: Do not change the default Z-order for a bubble when it appears for an active window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/bubble_delegate.cc
diff --git a/ui/views/bubble/bubble_delegate.cc b/ui/views/bubble/bubble_delegate.cc
index fd0f112ef32a2a2383c772087dffc15ef1bc538f..e67ee12cc8c6700c03f46c4f687a49011de50be4 100644
--- a/ui/views/bubble/bubble_delegate.cc
+++ b/ui/views/bubble/bubble_delegate.cc
@@ -40,8 +40,14 @@ Widget* CreateBubbleWidget(BubbleDelegateView* bubble) {
Widget::InitParams::ACTIVATABLE_YES : Widget::InitParams::ACTIVATABLE_NO;
bubble->OnBeforeBubbleWidgetInit(&bubble_params, bubble_widget);
bubble_widget->Init(bubble_params);
- if (bubble_params.parent)
- bubble_widget->StackAbove(bubble_params.parent);
+ if (bubble_params.parent) {
+ // If the parent is active, let the bubble become a top-most window.
+ // Otherwise, place it above the parent so other top level windows aren't
+ // overlapped.
+ Widget* parent = Widget::GetWidgetForNativeView(bubble_params.parent);
sky 2015/06/30 16:43:13 Why do we need to special case this? Shouldn't we
vasilii 2015/06/30 18:57:03 The original bug http://crbug.com/486730 was that
sky 2015/06/30 22:07:54 My question is why it matters. Won't the same thin
vasilii 2015/07/01 09:29:40 No, just watch the video from http://crbug.com/504
sky 2015/07/01 16:35:17 Sorry, but you're still not explaining why this co
vasilii 2015/07/02 09:12:52 The user opened a profile chooser. Then he opens t
+ if (parent && !parent->IsActive())
+ bubble_widget->StackAbove(bubble_params.parent);
+ }
return bubble_widget;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698