summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorananta <ananta@chromium.org>2016-01-12 16:26:13 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-13 00:27:31 +0000
commita694c749d0a432002fa12fcaad0182e71160303d (patch)
treea09f3656e7da86a4560e02d61a59b84002fa81e8
parentc85ed637028905bab1ed91b6a748515b4438c31d (diff)
downloadchromium_src-a694c749d0a432002fa12fcaad0182e71160303d.zip
chromium_src-a694c749d0a432002fa12fcaad0182e71160303d.tar.gz
chromium_src-a694c749d0a432002fa12fcaad0182e71160303d.tar.bz2
Fix a painting regression on Linux which was caused by the patch to use the force_software_compositing flag instead of TYPE_MENU to determine if we should use a top level window.
Restored the TYPE_MENU check for non windows platforms. BUG=576555 Review URL: https://codereview.chromium.org/1579693005 Cr-Commit-Position: refs/heads/master@{#369047}
-rw-r--r--chrome/browser/ui/views/chrome_views_delegate.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/ui/views/chrome_views_delegate.cc b/chrome/browser/ui/views/chrome_views_delegate.cc
index 03ff778..69c08b5 100644
--- a/chrome/browser/ui/views/chrome_views_delegate.cc
+++ b/chrome/browser/ui/views/chrome_views_delegate.cc
@@ -333,7 +333,15 @@ void ChromeViewsDelegate::OnBeforeWidgetInit(
#if defined(USE_AURA) && !defined(OS_CHROMEOS)
bool use_non_toplevel_window =
params->parent &&
+#if defined(OS_WIN)
+ // Check the force_software_compositing flag only on Windows. If this
+ // flag is on, it means that the widget being created wants to use the
+ // software compositor which requires a top level window. We cannot have
+ // a mixture of compositors active in one view hierarchy.
!params->force_software_compositing &&
+#else
+ params->type != views::Widget::InitParams::TYPE_MENU &&
+#endif
params->type != views::Widget::InitParams::TYPE_TOOLTIP;
#if defined(OS_WIN)