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

Side by Side Diff: ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc

Issue 319133006: ozone: gestures: Fix multiple clicking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add todo Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cr os.h" 5 #include "ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cr os.h"
6 6
7 #include <gestures/gestures.h> 7 #include <gestures/gestures.h>
8 #include <libevdev/libevdev.h> 8 #include <libevdev/libevdev.h>
9 9
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 257
258 void GestureInterpreterLibevdevCros::DispatchMouseButton(unsigned int modifier, 258 void GestureInterpreterLibevdevCros::DispatchMouseButton(unsigned int modifier,
259 bool down) { 259 bool down) {
260 if (!cursor_) 260 if (!cursor_)
261 return; // No cursor! 261 return; // No cursor!
262 const gfx::PointF& loc = cursor_->location(); 262 const gfx::PointF& loc = cursor_->location();
263 int flag = modifiers_->GetEventFlagFromModifier(modifier); 263 int flag = modifiers_->GetEventFlagFromModifier(modifier);
264 EventType type = (down ? ET_MOUSE_PRESSED : ET_MOUSE_RELEASED); 264 EventType type = (down ? ET_MOUSE_PRESSED : ET_MOUSE_RELEASED);
265 modifiers_->UpdateModifier(modifier, down); 265 modifiers_->UpdateModifier(modifier, down);
266 MouseEvent event(type, loc, loc, modifiers_->GetModifierFlags() | flag, flag); 266 MouseEvent event(type, loc, loc, modifiers_->GetModifierFlags() | flag, flag);
267 Dispatch(&event); 267
268 // This hack is necessary to trigger setting the repeat count.
269 // TODO(spang): Fix it.
270 MouseEvent event2(&event);
271 Dispatch(&event2);
268 } 272 }
269 273
270 } // namespace ui 274 } // namespace ui
OLDNEW
« 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