summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-09 17:15:32 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-09 17:15:32 +0000
commita04faf568b03b5a9cd921e04358ff365729f9b91 (patch)
tree7fcd22afd891d5dbe31bf76908d758324a925869
parent486462d4d22ccab5a62f269f23c383d0c210a64f (diff)
downloadchromium_src-a04faf568b03b5a9cd921e04358ff365729f9b91.zip
chromium_src-a04faf568b03b5a9cd921e04358ff365729f9b91.tar.gz
chromium_src-a04faf568b03b5a9cd921e04358ff365729f9b91.tar.bz2
aura-x11: Ignore the release events for gesture buttons.
When one of the gesture-buttons on a mouse (i.e. back/forward buttons) is pressed, it triggers a user-action (which may do a navigation). For these buttons, the release events need to be ignored. Otherwise it results in a spurious mouse-up event in WebCore, which results in a crash. BUG=159685 Review URL: https://codereview.chromium.org/11368109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166922 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ui/aura/root_window_host_linux.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/aura/root_window_host_linux.cc b/ui/aura/root_window_host_linux.cc
index 095ce84..f2d0032 100644
--- a/ui/aura/root_window_host_linux.cc
+++ b/ui/aura/root_window_host_linux.cc
@@ -807,11 +807,14 @@ void RootWindowHostLinux::DispatchXI2Event(const base::NativeEvent& event) {
num_coalesced = ui::CoalescePendingMotionEvents(xev, &last_event);
if (num_coalesced > 0)
xev = &last_event;
- } else if (type == ui::ET_MOUSE_PRESSED) {
+ } else if (type == ui::ET_MOUSE_PRESSED ||
+ type == ui::ET_MOUSE_RELEASED) {
XIDeviceEvent* xievent =
static_cast<XIDeviceEvent*>(xev->xcookie.data);
int button = xievent->detail;
if (button == kBackMouseButton || button == kForwardMouseButton) {
+ if (type == ui::ET_MOUSE_RELEASED)
+ break;
client::UserActionClient* gesture_client =
client::GetUserActionClient(delegate_->AsRootWindow());
if (gesture_client) {