| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/host/ash_window_tree_host_x11.h" | 5 #include "ash/host/ash_window_tree_host_x11.h" |
| 6 | 6 |
| 7 #include <X11/extensions/Xfixes.h> | 7 #include <X11/extensions/Xfixes.h> |
| 8 #include <X11/extensions/XInput2.h> | 8 #include <X11/extensions/XInput2.h> |
| 9 #include <X11/Xatom.h> | 9 #include <X11/Xatom.h> |
| 10 #include <X11/Xlib.h> | 10 #include <X11/Xlib.h> |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 ConfineCursorToRootWindow(); | 119 ConfineCursorToRootWindow(); |
| 120 } | 120 } |
| 121 } | 121 } |
| 122 | 122 |
| 123 gfx::Insets AshWindowTreeHostX11::GetHostInsets() const { | 123 gfx::Insets AshWindowTreeHostX11::GetHostInsets() const { |
| 124 return transformer_helper_.GetHostInsets(); | 124 return transformer_helper_.GetHostInsets(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 aura::WindowTreeHost* AshWindowTreeHostX11::AsWindowTreeHost() { return this; } | 127 aura::WindowTreeHost* AshWindowTreeHostX11::AsWindowTreeHost() { return this; } |
| 128 | 128 |
| 129 void AshWindowTreeHostX11::RemapAsNormalWindow() { |
| 130 NOTREACHED(); |
| 131 } |
| 132 |
| 129 void AshWindowTreeHostX11::PrepareForShutdown() { | 133 void AshWindowTreeHostX11::PrepareForShutdown() { |
| 130 // Block the root window from dispatching events because it is weird for a | 134 // Block the root window from dispatching events because it is weird for a |
| 131 // ScreenPositionClient not to be attached to the root window and for | 135 // ScreenPositionClient not to be attached to the root window and for |
| 132 // ui::EventHandlers to be unable to convert the event's location to screen | 136 // ui::EventHandlers to be unable to convert the event's location to screen |
| 133 // coordinates. | 137 // coordinates. |
| 134 window()->SetEventTargeter( | 138 window()->SetEventTargeter( |
| 135 scoped_ptr<ui::EventTargeter>(new ui::NullEventTargeter)); | 139 scoped_ptr<ui::EventTargeter>(new ui::NullEventTargeter)); |
| 136 | 140 |
| 137 if (ui::PlatformEventSource::GetInstance()) { | 141 if (ui::PlatformEventSource::GetInstance()) { |
| 138 // Block X events which are not turned into ui::Events from getting | 142 // Block X events which are not turned into ui::Events from getting |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 #endif | 296 #endif |
| 293 | 297 |
| 294 AshWindowTreeHost* AshWindowTreeHost::Create( | 298 AshWindowTreeHost* AshWindowTreeHost::Create( |
| 295 const AshWindowTreeHostInitParams& init_params) { | 299 const AshWindowTreeHostInitParams& init_params) { |
| 296 if (init_params.offscreen) | 300 if (init_params.offscreen) |
| 297 return new AshWindowTreeHostUnified(init_params.initial_bounds); | 301 return new AshWindowTreeHostUnified(init_params.initial_bounds); |
| 298 return new AshWindowTreeHostX11(init_params.initial_bounds); | 302 return new AshWindowTreeHostX11(init_params.initial_bounds); |
| 299 } | 303 } |
| 300 | 304 |
| 301 } // namespace ash | 305 } // namespace ash |
| OLD | NEW |