Index: ui/views/widget/native_widget_aura.cc |
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc |
index 4904f00c228f44d1686a8e7a59ee0e275e82fe82..65d5903b835ab187d30165132a3b562b0ec4904a 100644 |
--- a/ui/views/widget/native_widget_aura.cc |
+++ b/ui/views/widget/native_widget_aura.cc |
@@ -48,6 +48,7 @@ |
#include "ui/views/widget/widget_delegate.h" |
#include "ui/views/widget/window_reorderer.h" |
#include "ui/wm/core/shadow_types.h" |
+#include "ui/wm/core/transient_window_manager.h" |
#include "ui/wm/core/window_animations.h" |
#include "ui/wm/core/window_util.h" |
#include "ui/wm/public/activation_client.h" |
@@ -181,6 +182,14 @@ void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) { |
if (!context) |
context = parent; |
parent = NULL; |
+ |
+ // Generally transient bubbles are showing state associated to the parent |
+ // window. Make sure the transient bubble is only visible if the parent is |
+ // visible, otherwise the bubble may not make sense by itself. |
+ if (params.type == Widget::InitParams::TYPE_BUBBLE) { |
+ wm::TransientWindowManager::Get(window_) |
+ ->set_parent_controls_visibility(true); |
+ } |
} |
// SetAlwaysOnTop before SetParent so that always-on-top container is used. |
SetAlwaysOnTop(params.keep_on_top); |