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

Unified Diff: chrome/browser/ui/views/chrome_views_delegate.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 | « chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc ('k') | ui/native_theme/fallback_theme.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/chrome_views_delegate.cc
diff --git a/chrome/browser/ui/views/chrome_views_delegate.cc b/chrome/browser/ui/views/chrome_views_delegate.cc
index dbd8771821a8981c0ebba1882ca532e8035d8738..2d846924018069daeeb5679c19a57bbb08c3b253 100644
--- a/chrome/browser/ui/views/chrome_views_delegate.cc
+++ b/chrome/browser/ui/views/chrome_views_delegate.cc
@@ -262,7 +262,9 @@ void ChromeViewsDelegate::OnBeforeWidgetInit(
#if defined(USE_AURA) && !defined(OS_CHROMEOS)
bool use_non_toplevel_window =
- params->parent && params->type != views::Widget::InitParams::TYPE_MENU;
+ params->parent &&
+ params->type != views::Widget::InitParams::TYPE_MENU &&
+ params->type != views::Widget::InitParams::TYPE_TOOLTIP;
#if defined(OS_WIN)
// On desktop Linux Chrome must run in an environment that supports a variety
@@ -321,10 +323,7 @@ void ChromeViewsDelegate::OnBeforeWidgetInit(
// While the majority of the time, context wasn't plumbed through due to the
// existence of a global WindowTreeClient, if this window is toplevel, it's
// possible that there is no contextual state that we can use.
- if (params->parent == NULL &&
- params->context == NULL &&
- !params->child &&
- params->type != views::Widget::InitParams::TYPE_TOOLTIP) {
+ if (params->parent == NULL && params->context == NULL && !params->child) {
// We need to make a decision about where to place this window based on the
// desktop type.
switch (chrome::GetActiveDesktop()) {
@@ -352,7 +351,7 @@ void ChromeViewsDelegate::OnBeforeWidgetInit(
parent_profile);
}
params->native_widget = native_widget;
- } else if (params->type != views::Widget::InitParams::TYPE_TOOLTIP) {
+ } else {
// TODO(erg): Once we've threaded context to everywhere that needs it, we
// should remove this check here.
gfx::NativeView to_check =
« no previous file with comments | « chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc ('k') | ui/native_theme/fallback_theme.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698