OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/exo/shell_surface.h" | 5 #include "components/exo/shell_surface.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/frame/custom_frame_view_ash.h" | 9 #include "ash/frame/custom_frame_view_ash.h" |
10 #include "ash/public/cpp/shelf_types.h" | 10 #include "ash/public/cpp/shelf_types.h" |
(...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1523 if (shadow_underlay_in_surface_ != pending_shadow_underlay_in_surface_) { | 1523 if (shadow_underlay_in_surface_ != pending_shadow_underlay_in_surface_) { |
1524 shadow_underlay_in_surface_ = pending_shadow_underlay_in_surface_; | 1524 shadow_underlay_in_surface_ = pending_shadow_underlay_in_surface_; |
1525 shadow_overlay_.reset(); | 1525 shadow_overlay_.reset(); |
1526 shadow_underlay_.reset(); | 1526 shadow_underlay_.reset(); |
1527 } | 1527 } |
1528 | 1528 |
1529 aura::Window* window = widget_->GetNativeWindow(); | 1529 aura::Window* window = widget_->GetNativeWindow(); |
1530 | 1530 |
1531 // Enable the black backdrop layer behind the window if the window | 1531 // Enable the black backdrop layer behind the window if the window |
1532 // is in immersive fullscreen, maximized, yet the window can control | 1532 // is in immersive fullscreen, maximized, yet the window can control |
1533 // the bounds of the window in fullscreen/maximize mode (thus the | 1533 // the bounds of the window in fullscreen/tablet mode (thus the |
1534 // background can be visible). | 1534 // background can be visible). |
1535 bool enable_backdrop = | 1535 bool enable_backdrop = |
1536 (widget_->IsFullscreen() || widget_->IsMaximized()) && | 1536 (widget_->IsFullscreen() || widget_->IsMaximized()) && |
1537 ash::wm::GetWindowState(window)->allow_set_bounds_direct(); | 1537 ash::wm::GetWindowState(window)->allow_set_bounds_direct(); |
1538 if (window->GetProperty(aura::client::kHasBackdrop) != enable_backdrop) | 1538 if (window->GetProperty(aura::client::kHasBackdrop) != enable_backdrop) |
1539 window->SetProperty(aura::client::kHasBackdrop, enable_backdrop); | 1539 window->SetProperty(aura::client::kHasBackdrop, enable_backdrop); |
1540 | 1540 |
1541 if (!shadow_enabled_) { | 1541 if (!shadow_enabled_) { |
1542 wm::SetShadowElevation(window, wm::ShadowElevation::NONE); | 1542 wm::SetShadowElevation(window, wm::ShadowElevation::NONE); |
1543 if (shadow_underlay_) | 1543 if (shadow_underlay_) |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1664 gfx::Point ShellSurface::GetMouseLocation() const { | 1664 gfx::Point ShellSurface::GetMouseLocation() const { |
1665 aura::Window* const root_window = widget_->GetNativeWindow()->GetRootWindow(); | 1665 aura::Window* const root_window = widget_->GetNativeWindow()->GetRootWindow(); |
1666 gfx::Point location = | 1666 gfx::Point location = |
1667 root_window->GetHost()->dispatcher()->GetLastMouseLocationInRoot(); | 1667 root_window->GetHost()->dispatcher()->GetLastMouseLocationInRoot(); |
1668 aura::Window::ConvertPointToTarget( | 1668 aura::Window::ConvertPointToTarget( |
1669 root_window, widget_->GetNativeWindow()->parent(), &location); | 1669 root_window, widget_->GetNativeWindow()->parent(), &location); |
1670 return location; | 1670 return location; |
1671 } | 1671 } |
1672 | 1672 |
1673 } // namespace exo | 1673 } // namespace exo |
OLD | NEW |