OLD | NEW |
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009 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/mock_x_connection.h" | 5 #include "window_manager/mock_x_connection.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 #include "window_manager/util.h" | 9 #include "window_manager/util.h" |
10 | 10 |
11 namespace chromeos { | 11 namespace window_manager { |
12 | 12 |
13 MockXConnection::MockXConnection() | 13 MockXConnection::MockXConnection() |
14 : windows_(), | 14 : windows_(), |
15 stacked_xids_(new Stacker<XWindow>), | 15 stacked_xids_(new Stacker<XWindow>), |
16 next_window_(1), | 16 next_window_(1), |
17 // TODO: Replace magic numbers. | 17 // TODO: Replace magic numbers. |
18 root_(CreateWindow(None, 0, 0, 1024, 768, true, false, 0)), | 18 root_(CreateWindow(None, 0, 0, 1024, 768, true, false, 0)), |
19 overlay_(CreateWindow(root_, 0, 0, 1024, 768, true, false, 0)), | 19 overlay_(CreateWindow(root_, 0, 0, 1024, 768, true, false, 0)), |
20 next_atom_(1000), | 20 next_atom_(1000), |
21 focused_xid_(None), | 21 focused_xid_(None), |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 | 607 |
608 // static | 608 // static |
609 void MockXConnection::InitUnmapEvent(XEvent* event, XWindow xid) { | 609 void MockXConnection::InitUnmapEvent(XEvent* event, XWindow xid) { |
610 CHECK(event); | 610 CHECK(event); |
611 XUnmapEvent* unmap_event = &(event->xunmap); | 611 XUnmapEvent* unmap_event = &(event->xunmap); |
612 memset(unmap_event, 0, sizeof(*unmap_event)); | 612 memset(unmap_event, 0, sizeof(*unmap_event)); |
613 unmap_event->type = UnmapNotify; | 613 unmap_event->type = UnmapNotify; |
614 unmap_event->window = xid; | 614 unmap_event->window = xid; |
615 } | 615 } |
616 | 616 |
617 } // namespace chromeos | 617 } // namespace window_manager |
OLD | NEW |