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

Unified Diff: ui/aura/dispatcher_linux.cc

Issue 10756003: Apply Ash's key rewriter to an aura::MouseEvent so that Modifler+Click is handled correctly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 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 | « chrome/browser/ui/views/ash/key_rewriter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/dispatcher_linux.cc
diff --git a/ui/aura/dispatcher_linux.cc b/ui/aura/dispatcher_linux.cc
index a8d327aa37c595c9147bc6c0a7f61e77529369a9..7d13665c206d465cd945ac15ec5313582b94f74a 100644
--- a/ui/aura/dispatcher_linux.cc
+++ b/ui/aura/dispatcher_linux.cc
@@ -8,33 +8,6 @@
#include "ui/base/events.h"
-namespace {
-
-// Pro-processes an XEvent before it is handled. The pre-processings include:
-// - Map Alt+Button1 to Button3
-void PreprocessXEvent(XEvent* xevent) {
- if (!xevent || xevent->type != GenericEvent)
- return;
-
- XIDeviceEvent* xievent = static_cast<XIDeviceEvent*>(xevent->xcookie.data);
- if ((xievent->evtype == XI_ButtonPress ||
- xievent->evtype == XI_ButtonRelease) &&
- (xievent->mods.effective & Mod1Mask) &&
- xievent->detail == 1) {
- xievent->mods.effective &= ~Mod1Mask;
- xievent->detail = 3;
- if (xievent->evtype == XI_ButtonRelease) {
- // On the release clear the left button from the existing state and the
- // mods, and set the right button.
- XISetMask(xievent->buttons.mask, 3);
- XIClearMask(xievent->buttons.mask, 1);
- xievent->mods.effective &= ~Button1Mask;
- }
- }
-}
-
-} // namespace
-
namespace aura {
DispatcherLinux::DispatcherLinux()
@@ -109,7 +82,6 @@ bool DispatcherLinux::Dispatch(const base::NativeEvent& xev) {
base::EventStatus DispatcherLinux::WillProcessEvent(
const base::NativeEvent& event) {
- PreprocessXEvent(event);
return base::EVENT_CONTINUE;
}
« no previous file with comments | « chrome/browser/ui/views/ash/key_rewriter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698