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/views/widget/desktop_root_window_host_linux.h" | 5 #include "ui/views/widget/desktop_root_window_host_linux.h" |
6 | 6 |
7 #include <X11/extensions/XInput2.h> | 7 #include <X11/extensions/XInput2.h> |
8 #include <X11/Xatom.h> | 8 #include <X11/Xatom.h> |
9 #include <X11/Xutil.h> | 9 #include <X11/Xutil.h> |
10 | 10 |
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
910 // } | 910 // } |
911 case ui::ET_MOUSE_MOVED: | 911 case ui::ET_MOUSE_MOVED: |
912 case ui::ET_MOUSE_DRAGGED: | 912 case ui::ET_MOUSE_DRAGGED: |
913 case ui::ET_MOUSE_PRESSED: | 913 case ui::ET_MOUSE_PRESSED: |
914 case ui::ET_MOUSE_RELEASED: | 914 case ui::ET_MOUSE_RELEASED: |
915 case ui::ET_MOUSE_ENTERED: | 915 case ui::ET_MOUSE_ENTERED: |
916 case ui::ET_MOUSE_EXITED: { | 916 case ui::ET_MOUSE_EXITED: { |
917 if (type == ui::ET_MOUSE_MOVED || type == ui::ET_MOUSE_DRAGGED) { | 917 if (type == ui::ET_MOUSE_MOVED || type == ui::ET_MOUSE_DRAGGED) { |
918 // If this is a motion event, we want to coalesce all pending motion | 918 // If this is a motion event, we want to coalesce all pending motion |
919 // events that are at the top of the queue. | 919 // events that are at the top of the queue. |
920 num_coalesced = ui::CoalescePendingMotionEvents(xev, &last_event); | 920 // num_coalesced = CoalescePendingMotionEvents(xev, &last_event); |
921 if (num_coalesced > 0) | 921 // if (num_coalesced > 0) |
922 xev = &last_event; | 922 // xev = &last_event; |
923 } else if (type == ui::ET_MOUSE_PRESSED) { | 923 } else if (type == ui::ET_MOUSE_PRESSED) { |
924 XIDeviceEvent* xievent = | 924 XIDeviceEvent* xievent = |
925 static_cast<XIDeviceEvent*>(xev->xcookie.data); | 925 static_cast<XIDeviceEvent*>(xev->xcookie.data); |
926 int button = xievent->detail; | 926 int button = xievent->detail; |
927 if (button == kBackMouseButton || button == kForwardMouseButton) { | 927 if (button == kBackMouseButton || button == kForwardMouseButton) { |
928 aura::client::UserActionClient* gesture_client = | 928 aura::client::UserActionClient* gesture_client = |
929 aura::client::GetUserActionClient( | 929 aura::client::GetUserActionClient( |
930 root_window_host_delegate_->AsRootWindow()); | 930 root_window_host_delegate_->AsRootWindow()); |
931 if (gesture_client) { | 931 if (gesture_client) { |
932 bool reverse_direction = | 932 bool reverse_direction = |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 DesktopRootWindowHost* DesktopRootWindowHost::Create( | 1057 DesktopRootWindowHost* DesktopRootWindowHost::Create( |
1058 internal::NativeWidgetDelegate* native_widget_delegate, | 1058 internal::NativeWidgetDelegate* native_widget_delegate, |
1059 DesktopNativeWidgetAura* desktop_native_widget_aura, | 1059 DesktopNativeWidgetAura* desktop_native_widget_aura, |
1060 const gfx::Rect& initial_bounds) { | 1060 const gfx::Rect& initial_bounds) { |
1061 return new DesktopRootWindowHostLinux(native_widget_delegate, | 1061 return new DesktopRootWindowHostLinux(native_widget_delegate, |
1062 desktop_native_widget_aura, | 1062 desktop_native_widget_aura, |
1063 initial_bounds); | 1063 initial_bounds); |
1064 } | 1064 } |
1065 | 1065 |
1066 } // namespace views | 1066 } // namespace views |
OLD | NEW |