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

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

Issue 290573003: Make tooltips toplevel windows on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « ui/views/corewm/tooltip_aura.cc ('k') | ui/views/widget/desktop_aura/desktop_screen_position_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
index c5c977af61e355d5e990a3f0e3d8dbc2445ecf3d..f243083f5051e8fc5925406356f97cbfb708d2fb 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -299,9 +299,11 @@ void DesktopNativeWidgetAura::OnHostClosed() {
// references. Make sure we destroy ShadowController early on.
shadow_controller_.reset();
tooltip_manager_.reset();
- host_->window()->RemovePreTargetHandler(tooltip_controller_.get());
- aura::client::SetTooltipClient(host_->window(), NULL);
- tooltip_controller_.reset();
+ if (tooltip_controller_.get()) {
+ host_->window()->RemovePreTargetHandler(tooltip_controller_.get());
+ aura::client::SetTooltipClient(host_->window(), NULL);
+ tooltip_controller_.reset();
+ }
root_window_event_filter_->RemoveHandler(input_method_event_filter_.get());
@@ -496,14 +498,15 @@ void DesktopNativeWidgetAura::InitNativeWidget(
drop_helper_.reset(new DropHelper(GetWidget()->GetRootView()));
aura::client::SetDragDropDelegate(content_window_, this);
- tooltip_manager_.reset(new TooltipManagerAura(GetWidget()));
-
- tooltip_controller_.reset(
- new corewm::TooltipController(
- desktop_window_tree_host_->CreateTooltip()));
- aura::client::SetTooltipClient(host_->window(),
- tooltip_controller_.get());
- host_->window()->AddPreTargetHandler(tooltip_controller_.get());
+ if (params.type != Widget::InitParams::TYPE_TOOLTIP) {
+ tooltip_manager_.reset(new TooltipManagerAura(GetWidget()));
+ tooltip_controller_.reset(
+ new corewm::TooltipController(
+ desktop_window_tree_host_->CreateTooltip()));
+ aura::client::SetTooltipClient(host_->window(),
+ tooltip_controller_.get());
+ host_->window()->AddPreTargetHandler(tooltip_controller_.get());
+ }
if (params.opacity == Widget::InitParams::TRANSLUCENT_WINDOW) {
visibility_controller_.reset(new wm::VisibilityController);
« no previous file with comments | « ui/views/corewm/tooltip_aura.cc ('k') | ui/views/widget/desktop_aura/desktop_screen_position_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698