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/Xfixes.h> | 9 #include <X11/extensions/Xfixes.h> |
10 #include <X11/extensions/XInput2.h> | 10 #include <X11/extensions/XInput2.h> |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 default: | 692 default: |
693 break; | 693 break; |
694 } | 694 } |
695 XSendEvent(xdisplay_, xwindow_, False, 0, &xevent); | 695 XSendEvent(xdisplay_, xwindow_, False, 0, &xevent); |
696 } | 696 } |
697 | 697 |
698 void WindowTreeHostX11::OnDeviceScaleFactorChanged( | 698 void WindowTreeHostX11::OnDeviceScaleFactorChanged( |
699 float device_scale_factor) { | 699 float device_scale_factor) { |
700 } | 700 } |
701 | 701 |
702 void WindowTreeHostX11::PrepareForShutdown() { | |
703 base::MessagePumpX11::Current()->RemoveDispatcherForWindow(xwindow_); | |
704 } | |
705 | |
706 void WindowTreeHostX11::SetCursorNative(gfx::NativeCursor cursor) { | 702 void WindowTreeHostX11::SetCursorNative(gfx::NativeCursor cursor) { |
707 if (cursor == current_cursor_) | 703 if (cursor == current_cursor_) |
708 return; | 704 return; |
709 current_cursor_ = cursor; | 705 current_cursor_ = cursor; |
710 SetCursorInternal(cursor); | 706 SetCursorInternal(cursor); |
711 } | 707 } |
712 | 708 |
713 void WindowTreeHostX11::MoveCursorToNative(const gfx::Point& location) { | 709 void WindowTreeHostX11::MoveCursorToNative(const gfx::Point& location) { |
714 XWarpPointer(xdisplay_, None, x_root_window_, 0, 0, 0, 0, | 710 XWarpPointer(xdisplay_, None, x_root_window_, 0, 0, 0, 0, |
715 bounds_.x() + location.x(), | 711 bounds_.x() + location.x(), |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
917 } | 913 } |
918 | 914 |
919 namespace test { | 915 namespace test { |
920 | 916 |
921 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { | 917 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { |
922 default_override_redirect = override_redirect; | 918 default_override_redirect = override_redirect; |
923 } | 919 } |
924 | 920 |
925 } // namespace test | 921 } // namespace test |
926 } // namespace aura | 922 } // namespace aura |
OLD | NEW |