aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-notebook.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ephy-notebook.c')
-rw-r--r--src/ephy-notebook.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 893880f13..48d8856ef 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -549,6 +549,21 @@ button_press_cb (EphyNotebook *notebook,
"motion-notify-event",
G_CALLBACK (motion_notify_cb), NULL);
}
+ else if (GDK_BUTTON_PRESS == event->type && 3 == event->button)
+ {
+ if (tab_clicked == -1)
+ {
+ /* consume event, so that we don't pop up the context menu when
+ * the mouse if not over a tab label
+ */
+ return TRUE;
+ }
+ else
+ {
+ /* switch to the page the mouse is over, but don't consume the event */
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), tab_clicked);
+ }
+ }
return FALSE;
}