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

Side by Side Diff: screen_locker_handler.cc

Issue 6902072: wm: Update a lot of code to use structs from geometry.h. (Closed) Base URL: ssh://gitrw.chromium.org:9222/window_manager.git@master
Patch Set: move override-redirect stacking and visibility into Window Created 9 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS 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 "window_manager/screen_locker_handler.h" 5 #include "window_manager/screen_locker_handler.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <tr1/unordered_set> 8 #include <tr1/unordered_set>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 } 92 }
93 93
94 void ScreenLockerHandler::HandleScreenResize() { 94 void ScreenLockerHandler::HandleScreenResize() {
95 for (set<XWindow>::const_iterator it = screen_locker_xids_.begin(); 95 for (set<XWindow>::const_iterator it = screen_locker_xids_.begin();
96 it != screen_locker_xids_.end(); ++it) { 96 it != screen_locker_xids_.end(); ++it) {
97 Window* win = wm_->GetWindowOrDie(*it); 97 Window* win = wm_->GetWindowOrDie(*it);
98 // TODO: The override-redirect check can be removed once Chrome is 98 // TODO: The override-redirect check can be removed once Chrome is
99 // using regular windows for the screen locker. 99 // using regular windows for the screen locker.
100 if (!win->override_redirect()) 100 if (!win->override_redirect())
101 win->ResizeClient(wm_->width(), wm_->height(), GRAVITY_NORTHWEST); 101 win->Resize(wm_->root_size(), GRAVITY_NORTHWEST);
102 } 102 }
103 } 103 }
104 104
105 bool ScreenLockerHandler::HandleWindowMapRequest(Window* win) { 105 bool ScreenLockerHandler::HandleWindowMapRequest(Window* win) {
106 DCHECK(win); 106 DCHECK(win);
107 if (win->type() != chromeos::WM_IPC_WINDOW_CHROME_SCREEN_LOCKER) 107 if (win->type() != chromeos::WM_IPC_WINDOW_CHROME_SCREEN_LOCKER)
108 return false; 108 return false;
109 109
110 win->SetVisibility(Window::VISIBILITY_SHOWN); 110 win->SetVisibility(Window::VISIBILITY_SHOWN);
111 win->Move(Point(0, 0), 0); 111 win->Move(Point(0, 0), 0);
112 win->ResizeClient(wm_->width(), wm_->height(), GRAVITY_NORTHWEST); 112 win->Resize(wm_->root_size(), GRAVITY_NORTHWEST);
113 wm_->stacking_manager()->StackWindowAtTopOfLayer( 113 wm_->stacking_manager()->StackWindowAtTopOfLayer(
114 win, 114 win,
115 StackingManager::LAYER_SCREEN_LOCKER, 115 StackingManager::LAYER_SCREEN_LOCKER,
116 StackingManager::SHADOW_DIRECTLY_BELOW_ACTOR); 116 StackingManager::SHADOW_DIRECTLY_BELOW_ACTOR);
117 return true; 117 return true;
118 } 118 }
119 119
120 void ScreenLockerHandler::HandleWindowMap(Window* win) { 120 void ScreenLockerHandler::HandleWindowMap(Window* win) {
121 DCHECK(win); 121 DCHECK(win);
122 // If we see an override-redirect info bubble that's asking to be displayed 122 // If we see an override-redirect info bubble that's asking to be displayed
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 wm_->compositor()->ResetActiveVisibilityGroups(); 482 wm_->compositor()->ResetActiveVisibilityGroups();
483 } 483 }
484 } 484 }
485 485
486 void ScreenLockerHandler::HandleDestroySnapshotTimeout() { 486 void ScreenLockerHandler::HandleDestroySnapshotTimeout() {
487 destroy_snapshot_timeout_id_ = -1; 487 destroy_snapshot_timeout_id_ = -1;
488 DestroySnapshotAndUpdateVisibilityGroup(); 488 DestroySnapshotAndUpdateVisibilityGroup();
489 } 489 }
490 490
491 } // namespace window_manager 491 } // namespace window_manager
OLDNEW
« no previous file with comments | « screen_locker_handler.h ('k') | screen_locker_handler_test.cc » ('j') | window.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698