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

Unified Diff: ui/base/events.h

Issue 8793002: aura-x11: Add support for xmodmap'ed pointer buttons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 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
Index: ui/base/events.h
diff --git a/ui/base/events.h b/ui/base/events.h
index 9827959610446e6513fe226afa90f8cde622562e..69f83084f76831a6cf9ec589ea6efc7ef428f612 100644
--- a/ui/base/events.h
+++ b/ui/base/events.h
@@ -80,6 +80,14 @@ UI_EXPORT int EventFlagsFromNative(const base::NativeEvent& native_event);
UI_EXPORT gfx::Point EventLocationFromNative(
const base::NativeEvent& native_event);
+#if defined(USE_X11)
+// Returns the 'real' button for an event. The button reported in slave events
+// does not take into account any remapping (e.g. using xmodmap), while the
+// button reported in master events do. This is a utility function to always
+// return the mapped button.
+UI_EXPORT int EventButtonFromNative(const base::NativeEvent& native_event);
+#endif
+
// Returns the KeyboardCode from a native event.
UI_EXPORT KeyboardCode KeyboardCodeFromNative(
const base::NativeEvent& native_event);
« no previous file with comments | « ui/aura/root_window_host_linux.cc ('k') | ui/base/x/events_x.cc » ('j') | ui/base/x/x11_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698