OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/exo/pointer.h" | 5 #include "components/exo/pointer.h" |
6 | 6 |
7 #include "ash/common/shell_window_ids.h" | 7 #include "ash/common/shell_window_ids.h" |
8 #include "ash/display/display_manager.h" | 8 #include "ash/display/display_manager.h" |
9 #include "components/exo/pointer_delegate.h" | 9 #include "components/exo/pointer_delegate.h" |
10 #include "components/exo/pointer_stylus_delegate.h" | 10 #include "components/exo/pointer_stylus_delegate.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 void Pointer::SetStylusDelegate(PointerStylusDelegate* delegate) { | 126 void Pointer::SetStylusDelegate(PointerStylusDelegate* delegate) { |
127 stylus_delegate_ = delegate; | 127 stylus_delegate_ = delegate; |
128 } | 128 } |
129 | 129 |
130 //////////////////////////////////////////////////////////////////////////////// | 130 //////////////////////////////////////////////////////////////////////////////// |
131 // ui::EventHandler overrides: | 131 // ui::EventHandler overrides: |
132 | 132 |
133 void Pointer::OnMouseEvent(ui::MouseEvent* event) { | 133 void Pointer::OnMouseEvent(ui::MouseEvent* event) { |
134 Surface* target = GetEffectiveTargetForEvent(event); | 134 Surface* target = GetEffectiveTargetForEvent(event); |
135 | 135 |
| 136 if (event->flags() & ui::EF_TOUCH_ACCESSIBILITY) |
| 137 return; |
| 138 |
136 auto new_pointer_type = pointer_type_; | 139 auto new_pointer_type = pointer_type_; |
137 if ((event->flags() & ui::EF_IS_SYNTHESIZED) == 0) { | 140 if ((event->flags() & ui::EF_IS_SYNTHESIZED) == 0) { |
138 new_pointer_type = event->pointer_details().pointer_type; | 141 new_pointer_type = event->pointer_details().pointer_type; |
139 if (new_pointer_type == ui::EventPointerType::POINTER_TYPE_UNKNOWN) | 142 if (new_pointer_type == ui::EventPointerType::POINTER_TYPE_UNKNOWN) |
140 new_pointer_type = ui::EventPointerType::POINTER_TYPE_MOUSE; | 143 new_pointer_type = ui::EventPointerType::POINTER_TYPE_MOUSE; |
141 } | 144 } |
142 | 145 |
143 // If target is different than the current pointer focus then we need to | 146 // If target is different than the current pointer focus then we need to |
144 // generate enter and leave events. | 147 // generate enter and leave events. |
145 if (target != focus_) { | 148 if (target != focus_) { |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 | 369 |
367 if (ui_scale != cursor_scale_) { | 370 if (ui_scale != cursor_scale_) { |
368 gfx::Transform transform; | 371 gfx::Transform transform; |
369 transform.Scale(ui_scale, ui_scale); | 372 transform.Scale(ui_scale, ui_scale); |
370 widget_->GetNativeWindow()->SetTransform(transform); | 373 widget_->GetNativeWindow()->SetTransform(transform); |
371 cursor_scale_ = ui_scale; | 374 cursor_scale_ = ui_scale; |
372 } | 375 } |
373 } | 376 } |
374 | 377 |
375 } // namespace exo | 378 } // namespace exo |
OLD | NEW |