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

Unified Diff: ui/events/x/events_x.cc

Issue 433533003: Merge 285580 "Currently, destroying a ui::TouchEvent removes its..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2062/src/
Patch Set: Created 6 years, 5 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 | « ui/events/win/events_win.cc ('k') | ui/events/x/events_x_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/x/events_x.cc
===================================================================
--- ui/events/x/events_x.cc (revision 286562)
+++ ui/events/x/events_x.cc (working copy)
@@ -599,6 +599,18 @@
delete event;
}
+void IncrementTouchIdRefCount(const base::NativeEvent& xev) {
+ ui::DeviceDataManagerX11* manager = ui::DeviceDataManagerX11::GetInstance();
+ double tracking_id;
+ if (!manager->GetEventData(
+ *xev, ui::DeviceDataManagerX11::DT_TOUCH_TRACKING_ID, &tracking_id)) {
+ return;
+ }
+
+ ui::TouchFactory* factory = ui::TouchFactory::GetInstance();
+ factory->AcquireSlotForTrackingID(tracking_id);
+}
+
void ClearTouchIdIfReleased(const base::NativeEvent& xev) {
ui::EventType type = ui::EventTypeFromNative(xev);
if (type == ui::ET_TOUCH_CANCELLED ||
« no previous file with comments | « ui/events/win/events_win.cc ('k') | ui/events/x/events_x_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698