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 |
702 void WindowTreeHostX11::SetCursorNative(gfx::NativeCursor cursor) { | 706 void WindowTreeHostX11::SetCursorNative(gfx::NativeCursor cursor) { |
703 if (cursor == current_cursor_) | 707 if (cursor == current_cursor_) |
704 return; | 708 return; |
705 current_cursor_ = cursor; | 709 current_cursor_ = cursor; |
706 SetCursorInternal(cursor); | 710 SetCursorInternal(cursor); |
707 } | 711 } |
708 | 712 |
709 void WindowTreeHostX11::MoveCursorToNative(const gfx::Point& location) { | 713 void WindowTreeHostX11::MoveCursorToNative(const gfx::Point& location) { |
710 XWarpPointer(xdisplay_, None, x_root_window_, 0, 0, 0, 0, | 714 XWarpPointer(xdisplay_, None, x_root_window_, 0, 0, 0, 0, |
711 bounds_.x() + location.x(), | 715 bounds_.x() + location.x(), |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 } | 917 } |
914 | 918 |
915 namespace test { | 919 namespace test { |
916 | 920 |
917 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { | 921 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { |
918 default_override_redirect = override_redirect; | 922 default_override_redirect = override_redirect; |
919 } | 923 } |
920 | 924 |
921 } // namespace test | 925 } // namespace test |
922 } // namespace aura | 926 } // namespace aura |
OLD | NEW |