| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 <X11/keysym.h> | 5 #include <X11/keysym.h> |
| 6 #include <X11/Xlib.h> | 6 #include <X11/Xlib.h> |
| 7 | 7 |
| 8 // X macro fail. | 8 // X macro fail. |
| 9 #if defined(RootWindow) | 9 #if defined(RootWindow) |
| 10 #undef RootWindow | 10 #undef RootWindow |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 marker_event->xclient.window = x_window_; | 223 marker_event->xclient.window = x_window_; |
| 224 marker_event->xclient.format = 8; | 224 marker_event->xclient.format = 8; |
| 225 } | 225 } |
| 226 marker_event->xclient.message_type = MarkerEventAtom(); | 226 marker_event->xclient.message_type = MarkerEventAtom(); |
| 227 XSendEvent(x_display_, x_window_, False, 0, marker_event); | 227 XSendEvent(x_display_, x_window_, False, 0, marker_event); |
| 228 ui::PlatformEventWaiter::Create(closure, base::Bind(&Matcher)); | 228 ui::PlatformEventWaiter::Create(closure, base::Bind(&Matcher)); |
| 229 } | 229 } |
| 230 private: | 230 private: |
| 231 aura::Window* RootWindowForPoint(const gfx::Point& point) { | 231 aura::Window* RootWindowForPoint(const gfx::Point& point) { |
| 232 // Most interactive_ui_tests run inside of the aura_test_helper | 232 // Most interactive_ui_tests run inside of the aura_test_helper |
| 233 // environment. This means that we can't rely on gfx::Screen and several | 233 // environment. This means that we can't rely on display::Screen and several |
| 234 // other things to work properly. Therefore we hack around this by | 234 // other things to work properly. Therefore we hack around this by |
| 235 // iterating across the windows owned DesktopWindowTreeHostX11 since this | 235 // iterating across the windows owned DesktopWindowTreeHostX11 since this |
| 236 // doesn't rely on having a DesktopScreenX11. | 236 // doesn't rely on having a DesktopScreenX11. |
| 237 std::vector<aura::Window*> windows = | 237 std::vector<aura::Window*> windows = |
| 238 DesktopWindowTreeHostX11::GetAllOpenWindows(); | 238 DesktopWindowTreeHostX11::GetAllOpenWindows(); |
| 239 for (std::vector<aura::Window*>::const_iterator it = windows.begin(); | 239 for (std::vector<aura::Window*>::const_iterator it = windows.begin(); |
| 240 it != windows.end(); ++it) { | 240 it != windows.end(); ++it) { |
| 241 if ((*it)->GetBoundsInScreen().Contains(point)) { | 241 if ((*it)->GetBoundsInScreen().Contains(point)) { |
| 242 return (*it)->GetRootWindow(); | 242 return (*it)->GetRootWindow(); |
| 243 } | 243 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 | 280 |
| 281 UIControlsAura* CreateUIControlsDesktopAura() { | 281 UIControlsAura* CreateUIControlsDesktopAura() { |
| 282 // The constructor of UIControlsDesktopX11 needs X11 connection to be | 282 // The constructor of UIControlsDesktopX11 needs X11 connection to be |
| 283 // initialized. | 283 // initialized. |
| 284 gfx::InitializeThreadedX11(); | 284 gfx::InitializeThreadedX11(); |
| 285 return new UIControlsDesktopX11(); | 285 return new UIControlsDesktopX11(); |
| 286 } | 286 } |
| 287 | 287 |
| 288 } // namespace test | 288 } // namespace test |
| 289 } // namespace views | 289 } // namespace views |
| OLD | NEW |