summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-21 03:02:41 +0000
committerjamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-21 03:02:41 +0000
commit06b393155ae3d5c407a546c3fc2fe0dbd8f25bed (patch)
tree1cf191656555a9880bc8112b68b855871673c97f
parent01d9c46e1fa33f3db26759642e3ba0b83270252e (diff)
downloadchromium_src-06b393155ae3d5c407a546c3fc2fe0dbd8f25bed.zip
chromium_src-06b393155ae3d5c407a546c3fc2fe0dbd8f25bed.tar.gz
chromium_src-06b393155ae3d5c407a546c3fc2fe0dbd8f25bed.tar.bz2
Check pid to filter echoes of mouse events injected by the Chromoting host.
BUG=None TEST=Manual Review URL: http://codereview.chromium.org/8365007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106665 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--remoting/host/local_input_monitor_mac.mm9
1 files changed, 6 insertions, 3 deletions
diff --git a/remoting/host/local_input_monitor_mac.mm b/remoting/host/local_input_monitor_mac.mm
index b99a5ad..c35a9b6 100644
--- a/remoting/host/local_input_monitor_mac.mm
+++ b/remoting/host/local_input_monitor_mac.mm
@@ -53,9 +53,12 @@ typedef std::set<remoting::ChromotingHost*> Hosts;
static CGEventRef LocalMouseMoved(CGEventTapProxy proxy, CGEventType type,
CGEventRef event, void* context) {
- CGPoint cgMousePos = CGEventGetLocation(event);
- SkIPoint mousePos = SkIPoint::Make(cgMousePos.x, cgMousePos.y);
- [static_cast<LocalInputMonitorImpl*>(context) localMouseMoved:mousePos];
+ int64_t pid = CGEventGetIntegerValueField(event, kCGEventSourceUnixProcessID);
+ if (pid == 0) {
+ CGPoint cgMousePos = CGEventGetLocation(event);
+ SkIPoint mousePos = SkIPoint::Make(cgMousePos.x, cgMousePos.y);
+ [static_cast<LocalInputMonitorImpl*>(context) localMouseMoved:mousePos];
+ }
return NULL;
}