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

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

Issue 2280433004: Fix missing shadows for tooltip and menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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/test/views_test_base.cc ('k') | ui/views/widget/widget_unittest.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_window_tree_host_x11.cc
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index 66a424a3b2fa782de0337b0d6a267aecb136b1a5..c8cd786c04dd63f09c52fe16a46eabf4ca276e8c 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -1358,10 +1358,14 @@ void DesktopWindowTreeHostX11::InitX11Window(
if (swa.override_redirect)
attribute_mask |= CWOverrideRedirect;
- Visual* visual;
- int depth;
- ui::ChooseVisualForWindow(true, &visual, &depth);
- if (depth == 32) {
+ const bool enable_transparent_visuals =
+ params.type == Widget::InitParams::TYPE_DRAG ||
+ params.type == Widget::InitParams::TYPE_WINDOW;
+
+ Visual* visual = CopyFromParent;
+ int depth = CopyFromParent;
+ ui::ChooseVisualForWindow(enable_transparent_visuals, &visual, &depth);
+ if (enable_transparent_visuals && depth == 32) {
attribute_mask |= CWColormap;
swa.colormap =
XCreateColormap(xdisplay_, x_root_window_, visual, AllocNone);
« no previous file with comments | « ui/views/test/views_test_base.cc ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698