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

Unified Diff: ash/wm/shadow_controller.cc

Issue 9169050: aura: No shadow for transparent window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comments in #2 Created 8 years, 11 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 | « ash/tooltips/tooltip_controller.cc ('k') | ui/aura/window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/shadow_controller.cc
diff --git a/ash/wm/shadow_controller.cc b/ash/wm/shadow_controller.cc
index 6f5a530ee7b9c73f5d78d70fb57ec02d1104dc6d..8575bbde9a8ac3e29a63a85ee70984d9b0355154 100644
--- a/ash/wm/shadow_controller.cc
+++ b/ash/wm/shadow_controller.cc
@@ -22,7 +22,11 @@ namespace internal {
namespace {
-ShadowType GetShadowTypeFromWindowType(aura::Window* window) {
+ShadowType GetShadowTypeFromWindow(aura::Window* window) {
+ // No shadow for transparent window.
+ if (window->transparent())
+ return SHADOW_TYPE_NONE;
+
switch (window->type()) {
case aura::client::WINDOW_TYPE_NORMAL:
case aura::client::WINDOW_TYPE_PANEL:
@@ -54,7 +58,7 @@ ShadowController::~ShadowController() {
void ShadowController::OnWindowInitialized(aura::Window* window) {
window->AddObserver(this);
- SetShadowType(window, GetShadowTypeFromWindowType(window));
+ SetShadowType(window, GetShadowTypeFromWindow(window));
HandlePossibleShadowVisibilityChange(window);
}
« no previous file with comments | « ash/tooltips/tooltip_controller.cc ('k') | ui/aura/window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698