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

Unified Diff: ui/wm/core/shadow_controller.cc

Issue 778283002: Don't show the shadow for maximized/fullscreen window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « no previous file | ui/wm/core/shadow_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/shadow_controller.cc
diff --git a/ui/wm/core/shadow_controller.cc b/ui/wm/core/shadow_controller.cc
index 99bfadf1130df4d5cbfcaae3993e84b4cf99a3ef..d25b4a551c34b9854b8011da97bfdbed347827f6 100644
--- a/ui/wm/core/shadow_controller.cc
+++ b/ui/wm/core/shadow_controller.cc
@@ -10,10 +10,12 @@
#include "base/logging.h"
#include "base/memory/linked_ptr.h"
#include "base/scoped_observer.h"
+#include "ui/aura/client/aura_constants.h"
#include "ui/aura/env.h"
#include "ui/aura/env_observer.h"
#include "ui/aura/window.h"
#include "ui/aura/window_observer.h"
+#include "ui/base/ui_base_types.h"
#include "ui/compositor/layer.h"
#include "ui/wm/core/shadow.h"
#include "ui/wm/core/shadow_types.h"
@@ -169,7 +171,7 @@ void ShadowController::Impl::OnWindowInitialized(aura::Window* window) {
void ShadowController::Impl::OnWindowPropertyChanged(aura::Window* window,
const void* key,
intptr_t old) {
- if (key == kShadowTypeKey) {
+ if (key == kShadowTypeKey || key == aura::client::kShowStateKey) {
HandlePossibleShadowVisibilityChange(window);
return;
}
@@ -207,6 +209,13 @@ void ShadowController::Impl::OnWindowActivated(aura::Window* gained_active,
bool ShadowController::Impl::ShouldShowShadowForWindow(
aura::Window* window) const {
+ ui::WindowShowState show_state =
+ window->GetProperty(aura::client::kShowStateKey);
+ if (show_state == ui::SHOW_STATE_FULLSCREEN ||
+ show_state == ui::SHOW_STATE_MAXIMIZED) {
+ return SHADOW_TYPE_NONE;
+ }
+
const ShadowType type = GetShadowType(window);
switch (type) {
case SHADOW_TYPE_NONE:
« no previous file with comments | « no previous file | ui/wm/core/shadow_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698