summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/tabs/tab_strip_gtk.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/gtk/tabs/tab_strip_gtk.cc')
-rw-r--r--chrome/browser/gtk/tabs/tab_strip_gtk.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/gtk/tabs/tab_strip_gtk.cc
index 65abf1f..8d6e5fd 100644
--- a/chrome/browser/gtk/tabs/tab_strip_gtk.cc
+++ b/chrome/browser/gtk/tabs/tab_strip_gtk.cc
@@ -720,7 +720,7 @@ void TabStripGtk::TabChangedAt(TabContents* contents, int index,
gtk_widget_queue_draw(tabstrip_.get());
}
-///////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
// TabStripGtk, TabGtk::Delegate implementation:
bool TabStripGtk::IsTabSelected(const TabGtk* tab) const {
@@ -1174,8 +1174,7 @@ gboolean TabStripGtk::OnMotionNotify(GtkWidget* widget, GdkEventMotion* event,
// static
gboolean TabStripGtk::OnMousePress(GtkWidget* widget, GdkEventButton* event,
TabStripGtk* tabstrip) {
- // TODO(jhawkins): Handle middle and right-click.
- // TODO(jhawkins): Are there no gdk constants for event->button?
+ // Nothing happens on mouse press for middle and right click.
if (event->button != 1)
return TRUE;
@@ -1200,12 +1199,13 @@ gboolean TabStripGtk::OnMousePress(GtkWidget* widget, GdkEventButton* event,
// static
gboolean TabStripGtk::OnMouseRelease(GtkWidget* widget, GdkEventButton* event,
TabStripGtk* tabstrip) {
- if (event->button != 1)
+ // TODO(jhawkins): Handle middle click.
+ if (event->button == 2)
return TRUE;
gfx::Point point(event->x, event->y);
if (tabstrip->hover_index_ != -1) {
- tabstrip->GetTabAt(tabstrip->hover_index_)->OnMouseRelease();
+ tabstrip->GetTabAt(tabstrip->hover_index_)->OnMouseRelease(event);
} else if (tabstrip->newtab_button_.get()->IsPointInBounds(point)) {
tabstrip->newtab_button_.get()->OnMouseRelease();
}