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 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 xevent.xmotion.x_root = point.x(); | 602 xevent.xmotion.x_root = point.x(); |
603 xevent.xmotion.y_root = point.y(); | 603 xevent.xmotion.y_root = point.y(); |
604 } | 604 } |
605 default: | 605 default: |
606 break; | 606 break; |
607 } | 607 } |
608 XSendEvent(xdisplay_, xwindow_, False, 0, &xevent); | 608 XSendEvent(xdisplay_, xwindow_, False, 0, &xevent); |
609 XFlush(xdisplay_); | 609 XFlush(xdisplay_); |
610 } | 610 } |
611 | 611 |
612 void WindowTreeHostX11::OnDeviceScaleFactorChanged( | |
613 float device_scale_factor) { | |
614 } | |
615 | |
616 void WindowTreeHostX11::SetCursorNative(gfx::NativeCursor cursor) { | 612 void WindowTreeHostX11::SetCursorNative(gfx::NativeCursor cursor) { |
617 if (cursor == current_cursor_) | 613 if (cursor == current_cursor_) |
618 return; | 614 return; |
619 current_cursor_ = cursor; | 615 current_cursor_ = cursor; |
620 SetCursorInternal(cursor); | 616 SetCursorInternal(cursor); |
621 } | 617 } |
622 | 618 |
623 void WindowTreeHostX11::MoveCursorToNative(const gfx::Point& location) { | 619 void WindowTreeHostX11::MoveCursorToNative(const gfx::Point& location) { |
624 XWarpPointer(xdisplay_, None, x_root_window_, 0, 0, 0, 0, | 620 XWarpPointer(xdisplay_, None, x_root_window_, 0, 0, 0, 0, |
625 bounds_.x() + location.x(), | 621 bounds_.x() + location.x(), |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 } | 724 } |
729 | 725 |
730 namespace test { | 726 namespace test { |
731 | 727 |
732 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { | 728 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { |
733 default_override_redirect = override_redirect; | 729 default_override_redirect = override_redirect; |
734 } | 730 } |
735 | 731 |
736 } // namespace test | 732 } // namespace test |
737 } // namespace aura | 733 } // namespace aura |
OLD | NEW |