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

Unified Diff: ui/views/widget/native_widget_aura.cc

Issue 2859333003: cros: Fix bubble dialog shows on desktop when parent window is invisible (Closed)
Patch Set: just create widget on stack Created 3 years, 7 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
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);

Powered by Google App Engine
This is Rietveld 408576698