Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(426)

Unified Diff: components/exo/pointer.cc

Issue 2342413002: exo: Send pointer location before button event (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/pointer.cc
diff --git a/components/exo/pointer.cc b/components/exo/pointer.cc
index 5c22d537ed2c3e959a75370007894ee58d632b45..d1bce58e09aac624a1483160848d806eae934ba7 100644
--- a/components/exo/pointer.cc
+++ b/components/exo/pointer.cc
@@ -174,13 +174,6 @@ void Pointer::OnMouseEvent(ui::MouseEvent* event) {
switch (event->type()) {
case ui::ET_MOUSE_PRESSED:
case ui::ET_MOUSE_RELEASED:
- if (focus_) {
- delegate_->OnPointerButton(event->time_stamp(),
- event->changed_button_flags(),
- event->type() == ui::ET_MOUSE_PRESSED);
- delegate_->OnPointerFrame();
- }
- break;
case ui::ET_MOUSE_MOVED:
case ui::ET_MOUSE_DRAGGED:
if (focus_) {
@@ -256,6 +249,14 @@ void Pointer::OnMouseEvent(ui::MouseEvent* event) {
break;
}
+ if (focus_ && (event->type() == ui::ET_MOUSE_PRESSED ||
+ event->type() == ui::ET_MOUSE_RELEASED)) {
+ delegate_->OnPointerButton(event->time_stamp(),
+ event->changed_button_flags(),
+ event->type() == ui::ET_MOUSE_PRESSED);
+ delegate_->OnPointerFrame();
+ }
reveman 2016/09/16 17:11:26 I'm failing to see how this change makes any diffe
+
if ((event->flags() & ui::EF_IS_SYNTHESIZED) == 0)
is_direct_input_ = (event->flags() & ui::EF_DIRECT_INPUT) != 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698