OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/widget/root_view.h" | 5 #include "views/widget/root_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
| 9 #if defined(TOUCH_UI) && defined(HAVE_XINPUT2) |
| 10 #include <gdk/gdkx.h> |
| 11 #endif |
| 12 |
9 #include "base/logging.h" | 13 #include "base/logging.h" |
10 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
11 #include "gfx/canvas_skia.h" | 15 #include "gfx/canvas_skia.h" |
| 16 #include "gfx/gtk_util.h" |
12 #include "ui/base/dragdrop/drag_drop_types.h" | 17 #include "ui/base/dragdrop/drag_drop_types.h" |
13 #include "ui/base/keycodes/keyboard_codes.h" | 18 #include "ui/base/keycodes/keyboard_codes.h" |
14 #include "views/focus/view_storage.h" | 19 #include "views/focus/view_storage.h" |
15 #include "views/layout/fill_layout.h" | 20 #include "views/layout/fill_layout.h" |
16 #include "views/widget/widget.h" | 21 #include "views/widget/widget.h" |
17 #include "views/window/window.h" | 22 #include "views/window/window.h" |
18 | 23 |
19 #if defined(TOUCH_UI) | 24 #if defined(TOUCH_UI) |
20 #include "views/touchui/gesture_manager.h" | 25 #include "views/touchui/gesture_manager.h" |
| 26 #if defined(HAVE_XINPUT2) |
| 27 #include "views/touchui/touch_factory.h" |
| 28 #endif |
21 #endif | 29 #endif |
22 | 30 |
23 #if defined(OS_LINUX) | 31 #if defined(OS_LINUX) |
24 #include "views/widget/widget_gtk.h" | 32 #include "views/widget/widget_gtk.h" |
25 #include "views/controls/textfield/native_textfield_views.h" | 33 #include "views/controls/textfield/native_textfield_views.h" |
26 #endif // defined(OS_LINUX) | 34 #endif // defined(OS_LINUX) |
27 | 35 |
28 namespace views { | 36 namespace views { |
29 | 37 |
30 ///////////////////////////////////////////////////////////////////////////// | 38 ///////////////////////////////////////////////////////////////////////////// |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 previous_cursor_ = ::SetCursor(cursor); | 795 previous_cursor_ = ::SetCursor(cursor); |
788 } else if (previous_cursor_) { | 796 } else if (previous_cursor_) { |
789 ::SetCursor(previous_cursor_); | 797 ::SetCursor(previous_cursor_); |
790 previous_cursor_ = NULL; | 798 previous_cursor_ = NULL; |
791 } | 799 } |
792 #elif defined(OS_LINUX) | 800 #elif defined(OS_LINUX) |
793 gfx::NativeView native_view = | 801 gfx::NativeView native_view = |
794 static_cast<WidgetGtk*>(GetWidget())->window_contents(); | 802 static_cast<WidgetGtk*>(GetWidget())->window_contents(); |
795 if (!native_view) | 803 if (!native_view) |
796 return; | 804 return; |
| 805 |
| 806 #if defined(TOUCH_UI) && defined(HAVE_XINPUT2) |
| 807 if (!TouchFactory::GetInstance()->IsCursorVisible()) { |
| 808 cursor = gfx::GetCursor(GDK_BLANK_CURSOR); |
| 809 } |
| 810 #endif |
| 811 |
797 gdk_window_set_cursor(native_view->window, cursor); | 812 gdk_window_set_cursor(native_view->window, cursor); |
798 #endif | 813 #endif |
799 } | 814 } |
800 | 815 |
801 } // namespace views | 816 } // namespace views |
OLD | NEW |