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

Unified Diff: ash/wm/lock_window_state.cc

Issue 330763005: [cros touch] Proper handling of non-maximized/fullscreen windows in lock screen container (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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/wm/lock_layout_manager_unittest.cc ('k') | chrome/browser/chromeos/login/ui/login_display_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/lock_window_state.cc
diff --git a/ash/wm/lock_window_state.cc b/ash/wm/lock_window_state.cc
index 100c5e176fc8629033c0bd344cdba8788618b859..5d38b59e8e51be375c01259aad205a6c6862c997 100644
--- a/ash/wm/lock_window_state.cc
+++ b/ash/wm/lock_window_state.cc
@@ -59,7 +59,13 @@ void LockWindowState::OnWMEvent(wm::WindowState* window_state,
case wm::WM_EVENT_SHOW_INACTIVE:
return;
case wm::WM_EVENT_SET_BOUNDS:
- UpdateBounds(window_state);
+ if (window_state->IsMaximized() || window_state->IsFullscreen()) {
+ UpdateBounds(window_state);
+ } else {
+ const ash::wm::SetBoundsEvent* bounds_event =
+ static_cast<const ash::wm::SetBoundsEvent*>(event);
+ window_state->SetBoundsConstrained(bounds_event->requested_bounds());
+ }
break;
case wm::WM_EVENT_ADDED_TO_WORKSPACE:
if (current_state_type_ != wm::WINDOW_STATE_TYPE_MAXIMIZED &&
@@ -154,6 +160,9 @@ wm::WindowStateType LockWindowState::GetMaximizedOrCenteredWindowType(
}
void LockWindowState::UpdateBounds(wm::WindowState* window_state) {
+ if (!window_state->IsMaximized() && !window_state->IsFullscreen())
+ return;
+
keyboard::KeyboardController* keyboard_controller =
keyboard::KeyboardController::GetInstance();
gfx::Rect keyboard_bounds;
« no previous file with comments | « ash/wm/lock_layout_manager_unittest.cc ('k') | chrome/browser/chromeos/login/ui/login_display_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698