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

Unified Diff: views/focus/accelerator_handler_touch.cc

Issue 5110011: A non-GTK version of menus for touchui. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix compile for touch on chromeos Created 10 years 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 | « views/focus/accelerator_handler.h ('k') | views/views.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/focus/accelerator_handler_touch.cc
diff --git a/views/focus/accelerator_handler_touch.cc b/views/focus/accelerator_handler_touch.cc
index a35fc453aaf9aef98c1181408bd1382dbc506471..dc880b8682c32ebbda0f04a7ed4df68066615e56 100644
--- a/views/focus/accelerator_handler_touch.cc
+++ b/views/focus/accelerator_handler_touch.cc
@@ -143,14 +143,9 @@ bool DispatchXEvent(XEvent* xev) {
#if defined(HAVE_XINPUT2)
if (xev->type == GenericEvent) {
- if (XGetEventData(xev->xgeneric.display, &xev->xcookie)) {
- XGenericEventCookie* cookie = &xev->xcookie;
- XIDeviceEvent* xiev = static_cast<XIDeviceEvent*>(cookie->data);
- xwindow = xiev->event;
- } else {
- DLOG(WARNING) << "Error fetching XGenericEventCookie for event.";
- return false;
- }
+ XGenericEventCookie* cookie = &xev->xcookie;
+ XIDeviceEvent* xiev = static_cast<XIDeviceEvent*>(cookie->data);
+ xwindow = xiev->event;
}
#endif
@@ -202,9 +197,7 @@ bool DispatchXEvent(XEvent* xev) {
#if defined(HAVE_XINPUT2)
case GenericEvent: {
- bool ret = DispatchX2Event(root, xev);
- XFreeEventData(xev->xgeneric.display, &xev->xcookie);
- return ret;
+ return DispatchX2Event(root, xev);
}
#endif
}
@@ -226,8 +219,11 @@ bool AcceleratorHandler::Dispatch(GdkEvent* event) {
return true;
}
-bool AcceleratorHandler::Dispatch(XEvent* xev) {
- return DispatchXEvent(xev);
+base::MessagePumpGlibXDispatcher::DispatchStatus AcceleratorHandler::Dispatch(
+ XEvent* xev) {
+ return DispatchXEvent(xev) ?
+ base::MessagePumpGlibXDispatcher::EVENT_PROCESSED :
+ base::MessagePumpGlibXDispatcher::EVENT_IGNORED;
}
} // namespace views
« no previous file with comments | « views/focus/accelerator_handler.h ('k') | views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698