OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ash/display/mirror_window_controller.h" | 5 #include "ash/display/mirror_window_controller.h" |
6 | 6 |
7 #if defined(USE_X11) | 7 #if defined(USE_X11) |
8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
9 | 9 |
10 // Xlib.h defines RootWindow. | 10 // Xlib.h defines RootWindow. |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "ui/base/cursor/cursors_aura.h" | 27 #include "ui/base/cursor/cursors_aura.h" |
28 #include "ui/base/hit_test.h" | 28 #include "ui/base/hit_test.h" |
29 #include "ui/base/layout.h" | 29 #include "ui/base/layout.h" |
30 #include "ui/base/resource/resource_bundle.h" | 30 #include "ui/base/resource/resource_bundle.h" |
31 #include "ui/compositor/reflector.h" | 31 #include "ui/compositor/reflector.h" |
32 #include "ui/gfx/canvas.h" | 32 #include "ui/gfx/canvas.h" |
33 #include "ui/gfx/image/image_skia.h" | 33 #include "ui/gfx/image/image_skia.h" |
34 #include "ui/gfx/image/image_skia_operations.h" | 34 #include "ui/gfx/image/image_skia_operations.h" |
35 #include "ui/gfx/native_widget_types.h" | 35 #include "ui/gfx/native_widget_types.h" |
36 | 36 |
| 37 #if defined(USE_X11) |
| 38 #include "ui/base/x/x11_util.h" |
| 39 #endif |
| 40 |
37 namespace ash { | 41 namespace ash { |
38 namespace internal { | 42 namespace internal { |
39 namespace { | 43 namespace { |
40 | 44 |
41 #if defined(USE_X11) | 45 #if defined(USE_X11) |
42 // Mirror window shouldn't handle input events. | 46 // Mirror window shouldn't handle input events. |
43 void DisableInput(XID window) { | 47 void DisableInput(XID window) { |
44 long event_mask = ExposureMask | VisibilityChangeMask | | 48 long event_mask = ExposureMask | VisibilityChangeMask | |
45 StructureNotifyMask | PropertyChangeMask; | 49 StructureNotifyMask | PropertyChangeMask; |
46 XSelectInput(base::MessagePumpX11::GetDefaultXDisplay(), | 50 XSelectInput(ui::GetXDisplay(), window, event_mask); |
47 window, event_mask); | |
48 } | 51 } |
49 #endif | 52 #endif |
50 | 53 |
51 class NoneCaptureClient : public aura::client::CaptureClient { | 54 class NoneCaptureClient : public aura::client::CaptureClient { |
52 public: | 55 public: |
53 NoneCaptureClient() {} | 56 NoneCaptureClient() {} |
54 virtual ~NoneCaptureClient() {} | 57 virtual ~NoneCaptureClient() {} |
55 | 58 |
56 private: | 59 private: |
57 // Does a capture on the |window|. | 60 // Does a capture on the |window|. |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 Shell::GetScreen()->GetPrimaryDisplay().id()); | 336 Shell::GetScreen()->GetPrimaryDisplay().id()); |
334 DCHECK(display_manager->mirrored_display().is_valid()); | 337 DCHECK(display_manager->mirrored_display().is_valid()); |
335 return scoped_ptr<aura::RootWindowTransformer>( | 338 return scoped_ptr<aura::RootWindowTransformer>( |
336 internal::CreateRootWindowTransformerForMirroredDisplay( | 339 internal::CreateRootWindowTransformerForMirroredDisplay( |
337 source_display_info, | 340 source_display_info, |
338 mirror_display_info)); | 341 mirror_display_info)); |
339 } | 342 } |
340 | 343 |
341 } // namespace internal | 344 } // namespace internal |
342 } // namespace ash | 345 } // namespace ash |
OLD | NEW |