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

Unified Diff: ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h

Issue 983213003: ozone: evdev: Fix possibility of stuck mouse buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h
diff --git a/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h b/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h
index aa87cc2c2dae835c01ce807de1452495cde8d87e..559828bd6cf4158e6cd83f55eef48077fe4f7a1a 100644
--- a/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h
+++ b/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.h
@@ -5,6 +5,7 @@
#ifndef UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_INTERPRETER_LIBEVDEV_CROS_H_
#define UI_EVENTS_OZONE_EVDEV_LIBGESTURES_GLUE_GESTURE_INTERPRETER_LIBEVDEV_CROS_H_
+#include <bitset>
#include <gestures/gestures.h>
#include <libevdev/libevdev.h>
@@ -81,7 +82,9 @@ class EVENTS_OZONE_EVDEV_EXPORT GestureInterpreterLibevdevCros
bool down,
stime_t time);
void DispatchChangedKeys(unsigned long* changed_keys, stime_t timestamp);
- void ReleaseKeys();
+ void ReleaseKeys(stime_t timestamp);
+ bool SetMouseButtonState(unsigned int button, bool down);
+ void ReleaseMouseButtons(stime_t timestamp);
// The unique device id.
int id_;
@@ -109,6 +112,10 @@ class EVENTS_OZONE_EVDEV_EXPORT GestureInterpreterLibevdevCros
// Last key state from libevdev.
unsigned long prev_key_state_[EVDEV_BITS_TO_LONGS(KEY_CNT)];
+ // Last mouse button state.
+ static const int kMouseButtonCount = BTN_JOYSTICK - BTN_MOUSE;
+ std::bitset<kMouseButtonCount> mouse_button_state_;
+
// Device pointer.
Evdev* evdev_;
« no previous file with comments | « no previous file | ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698