| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/aura/window_tree_host_x11.h" | 5 #include "ui/aura/window_tree_host_x11.h" |
| 6 | 6 |
| 7 #include <strings.h> | 7 #include <strings.h> |
| 8 #include <X11/cursorfont.h> | 8 #include <X11/cursorfont.h> |
| 9 #include <X11/extensions/XInput2.h> | 9 #include <X11/extensions/XInput2.h> |
| 10 #include <X11/extensions/Xrandr.h> | 10 #include <X11/extensions/Xrandr.h> |
| (...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 | 557 |
| 558 void WindowTreeHostX11::MoveCursorToNative(const gfx::Point& location) { | 558 void WindowTreeHostX11::MoveCursorToNative(const gfx::Point& location) { |
| 559 XWarpPointer(xdisplay_, None, x_root_window_, 0, 0, 0, 0, | 559 XWarpPointer(xdisplay_, None, x_root_window_, 0, 0, 0, 0, |
| 560 bounds_.x() + location.x(), | 560 bounds_.x() + location.x(), |
| 561 bounds_.y() + location.y()); | 561 bounds_.y() + location.y()); |
| 562 } | 562 } |
| 563 | 563 |
| 564 void WindowTreeHostX11::OnCursorVisibilityChangedNative(bool show) { | 564 void WindowTreeHostX11::OnCursorVisibilityChangedNative(bool show) { |
| 565 } | 565 } |
| 566 | 566 |
| 567 ui::EventProcessor* WindowTreeHostX11::GetEventProcessor() { | |
| 568 return dispatcher(); | |
| 569 } | |
| 570 | |
| 571 void WindowTreeHostX11::DispatchXI2Event(const base::NativeEvent& event) { | 567 void WindowTreeHostX11::DispatchXI2Event(const base::NativeEvent& event) { |
| 572 ui::TouchFactory* factory = ui::TouchFactory::GetInstance(); | 568 ui::TouchFactory* factory = ui::TouchFactory::GetInstance(); |
| 573 XEvent* xev = event; | 569 XEvent* xev = event; |
| 574 XIDeviceEvent* xiev = static_cast<XIDeviceEvent*>(xev->xcookie.data); | 570 XIDeviceEvent* xiev = static_cast<XIDeviceEvent*>(xev->xcookie.data); |
| 575 if (!factory->ShouldProcessXI2Event(xev)) | 571 if (!factory->ShouldProcessXI2Event(xev)) |
| 576 return; | 572 return; |
| 577 | 573 |
| 578 TRACE_EVENT1("input", "WindowTreeHostX11::DispatchXI2Event", | 574 TRACE_EVENT1("input", "WindowTreeHostX11::DispatchXI2Event", |
| 579 "event_latency_us", | 575 "event_latency_us", |
| 580 (ui::EventTimeForNow() - ui::EventTimeFromNative(event)). | 576 (ui::EventTimeForNow() - ui::EventTimeFromNative(event)). |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 } | 665 } |
| 670 | 666 |
| 671 namespace test { | 667 namespace test { |
| 672 | 668 |
| 673 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { | 669 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { |
| 674 default_override_redirect = override_redirect; | 670 default_override_redirect = override_redirect; |
| 675 } | 671 } |
| 676 | 672 |
| 677 } // namespace test | 673 } // namespace test |
| 678 } // namespace aura | 674 } // namespace aura |
| OLD | NEW |