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

Unified Diff: content/browser/renderer_host/input/synthetic_mouse_driver.cc

Issue 2807433003: No pointer captured when the pointer lock is applied (Closed)
Patch Set: pointer lock Created 3 years, 7 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
Index: content/browser/renderer_host/input/synthetic_mouse_driver.cc
diff --git a/content/browser/renderer_host/input/synthetic_mouse_driver.cc b/content/browser/renderer_host/input/synthetic_mouse_driver.cc
index aa76d1b6a2a38197fd2c8c2beb351d7a995cddde..bf30591abde145cd9f14383273d7aa70b15175c1 100644
--- a/content/browser/renderer_host/input/synthetic_mouse_driver.cc
+++ b/content/browser/renderer_host/input/synthetic_mouse_driver.cc
@@ -17,7 +17,9 @@ SyntheticMouseDriver::~SyntheticMouseDriver() {}
void SyntheticMouseDriver::DispatchEvent(SyntheticGestureTarget* target,
const base::TimeTicks& timestamp) {
mouse_event_.SetTimeStampSeconds(ConvertTimestampToSeconds(timestamp));
- target->DispatchInputEventToPlatform(mouse_event_);
+ if (mouse_event_.GetType() != blink::WebInputEvent::kUndefined)
+ target->DispatchInputEventToPlatform(mouse_event_);
+ mouse_event_.SetType(blink::WebInputEvent::kUndefined);
Navid Zolghadr 2017/05/17 16:30:10 We set the type to kUndefined again if it is alrea
lanwei 2017/05/19 15:04:57 Done.
}
void SyntheticMouseDriver::Press(float x,

Powered by Google App Engine
This is Rietveld 408576698