Chromium Code Reviews| Index: ui/base/x/events_x.cc |
| diff --git a/ui/base/x/events_x.cc b/ui/base/x/events_x.cc |
| index 3d3b7a65624efa1f29a59441e42b5192e4bd833d..480a0412d308ae2d4ae704c63793dc5771ab0dd3 100644 |
| --- a/ui/base/x/events_x.cc |
| +++ b/ui/base/x/events_x.cc |
| @@ -349,8 +349,14 @@ int GetTouchId(const base::NativeEvent& xev) { |
| if (!factory->ExtractTouchParam( |
| *xev, ui::TouchFactory::TP_TRACKING_ID, &tracking_id)) |
| LOG(ERROR) << "Could not get the slot ID for the event. Using 0."; |
| - else |
| + else { |
|
sadrul
2011/12/08 17:04:41
If you need brace in one, you should use them for
|
| slot = factory->GetSlotForTrackingID(tracking_id); |
| + ui::EventType type = ui::EventTypeFromNative(xev); |
| + if (type == ui::ET_TOUCH_CANCELLED || |
| + type == ui::ET_TOUCH_RELEASED) { |
| + factory->ReleaseSlotForTrackingID(tracking_id); |
| + } |
| + } |
| #else |
| if (!factory->ExtractTouchParam( |
| *xev, ui::TouchFactory::TP_SLOT_ID, &slot)) |