--- epiphany-2.15.2/src/ephy-notebook.c	2006/06/09 05:42:50	1.1
+++ epiphany-2.15.2/src/ephy-notebook.c	2006/06/09 06:17:42
@@ -36,6 +36,7 @@
 #include "ephy-debug.h"
 
 #include <glib/gi18n.h>
+#include <gdk/gdkkeysyms.h>
 #include <gtk/gtkeventbox.h>
 #include <gtk/gtkhbox.h>
 #include <gtk/gtklabel.h>
@@ -370,6 +371,19 @@ button_press_cb (EphyNotebook *notebook,
 	return FALSE;
 }
 
+static gboolean
+key_press_cb (EphyNotebook *notebook,
+	      GdkEventKey *event,
+	      gpointer data)
+{
+	if ((event->state & GDK_MODIFIER_MASK) == GDK_MOD1_MASK &&
+	    (event->keyval == GDK_Left || event->keyval == GDK_Right))
+		/* Gecko didn't want to go forward/back; if GtkNotebook gets 
+		 * this it will reorder the tabs, so intercept it */
+		return TRUE;
+	return FALSE;
+}
+
 static void
 ephy_notebook_switch_page_cb (GtkNotebook *notebook,
 			      GtkNotebookPage *page,
@@ -491,6 +505,8 @@ ephy_notebook_init (EphyNotebook *notebo
 
 	g_signal_connect (notebook, "button-press-event",
 			  (GCallback)button_press_cb, NULL);
+	g_signal_connect (notebook, "key-press-event",
+			  (GCallback)key_press_cb, NULL);
 	g_signal_connect_after (notebook, "switch-page",
 				G_CALLBACK (ephy_notebook_switch_page_cb),
 				NULL);
