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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 2353783002: Fix missing shadows for modal window (Closed)
Patch Set: Really fix missing shadow for the feedback window 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
6 6
7 #include <X11/extensions/shape.h> 7 #include <X11/extensions/shape.h>
8 #include <X11/extensions/XInput2.h> 8 #include <X11/extensions/XInput2.h>
9 #include <X11/Xatom.h> 9 #include <X11/Xatom.h>
10 #include <X11/Xregion.h> 10 #include <X11/Xregion.h>
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 window_type = atom_cache_.GetAtom("_NET_WM_WINDOW_TYPE_NORMAL"); 1352 window_type = atom_cache_.GetAtom("_NET_WM_WINDOW_TYPE_NORMAL");
1353 break; 1353 break;
1354 } 1354 }
1355 // An in-activatable window should not interact with the system wm. 1355 // An in-activatable window should not interact with the system wm.
1356 if (!activatable_) 1356 if (!activatable_)
1357 swa.override_redirect = True; 1357 swa.override_redirect = True;
1358 1358
1359 if (swa.override_redirect) 1359 if (swa.override_redirect)
1360 attribute_mask |= CWOverrideRedirect; 1360 attribute_mask |= CWOverrideRedirect;
1361 1361
1362 Widget* widget = native_widget_delegate_->AsWidget();
1362 const bool enable_transparent_visuals = 1363 const bool enable_transparent_visuals =
1363 params.type == Widget::InitParams::TYPE_DRAG || 1364 params.type == Widget::InitParams::TYPE_DRAG ||
1364 params.type == Widget::InitParams::TYPE_WINDOW; 1365 (params.type == Widget::InitParams::TYPE_WINDOW &&
1366 params.wm_role_name == "browser") ||
1367 (params.type == Widget::InitParams::TYPE_WINDOW && !widget->IsModal() &&
1368 params.opacity == Widget::InitParams::TRANSLUCENT_WINDOW);
1365 1369
1366 Visual* visual = CopyFromParent; 1370 Visual* visual = CopyFromParent;
1367 int depth = CopyFromParent; 1371 int depth = CopyFromParent;
1368 ui::ChooseVisualForWindow(enable_transparent_visuals, &visual, &depth); 1372 ui::ChooseVisualForWindow(enable_transparent_visuals, &visual, &depth);
1369 if (enable_transparent_visuals && depth == 32) { 1373 if (enable_transparent_visuals && depth == 32) {
1370 attribute_mask |= CWColormap; 1374 attribute_mask |= CWColormap;
1371 swa.colormap = 1375 swa.colormap =
1372 XCreateColormap(xdisplay_, x_root_window_, visual, AllocNone); 1376 XCreateColormap(xdisplay_, x_root_window_, visual, AllocNone);
1373 1377
1374 // x.org will BadMatch if we don't set a border when the depth isn't the 1378 // x.org will BadMatch if we don't set a border when the depth isn't the
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
2313 if (linux_ui) { 2317 if (linux_ui) {
2314 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); 2318 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window);
2315 if (native_theme) 2319 if (native_theme)
2316 return native_theme; 2320 return native_theme;
2317 } 2321 }
2318 2322
2319 return ui::NativeThemeAura::instance(); 2323 return ui::NativeThemeAura::instance();
2320 } 2324 }
2321 2325
2322 } // namespace views 2326 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698