Commit cfdae275 authored by estade@chromium.org's avatar estade@chromium.org

Linux: For mouse button clicks, only send buttons 1, 2, 3 to the renderer.

BUG=16236
TEST=no more sad tab on clicking mouse back button

Review URL: http://codereview.chromium.org/155250

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20217 0039d316-1c4b-4281-b951-d872f2087c98
parent 32646ea9
......@@ -220,6 +220,9 @@ class RenderWidgetHostViewGtkWidget {
static gboolean ButtonPressReleaseEvent(
GtkWidget* widget, GdkEventButton* event,
RenderWidgetHostViewGtk* host_view) {
if (!(event->button == 1 || event->button == 2 || event->button == 3))
return FALSE; // We do not forward any other buttons to the renderer.
// We want to translate the coordinates of events that do not originate
// from this widget to be relative to the top left of the widget.
GtkWidget* event_widget = gtk_get_event_widget(
......@@ -253,7 +256,7 @@ class RenderWidgetHostViewGtkWidget {
if (event->type == GDK_BUTTON_PRESS && !GTK_WIDGET_HAS_FOCUS(widget))
gtk_widget_grab_focus(widget);
return FALSE;
return TRUE; // We did handle the mouse event.
}
static gboolean MouseMoveEvent(GtkWidget* widget, GdkEventMotion* event,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment