--- totem-2.18.2/browser-plugin/totem-plugin-viewer.c	2007-03-26 06:20:03.000000000 +0530
+++ totem-2.18.2.mine/browser-plugin/totem-plugin-viewer.c	2007-06-24 21:30:57.000000000 +0530
@@ -123,6 +123,9 @@ typedef struct _TotemEmbedded {
 	GtkAdjustment *seekadj;
 	GtkWidget *seek;
 
+	/* Fullscreen */
+	GtkWidget * fullscreen_window;
+
 	/* Error */
 
 	guint type : 3; /* TotemPluginType */
@@ -137,6 +140,7 @@ typedef struct _TotemEmbedded {
 	guint noautostart : 1;
 	guint autostart : 1;
 	guint audioonly : 1;
+	guint fullscreen : 1;
 } TotemEmbedded;
 
 GType totem_embedded_get_type (void);
@@ -1059,6 +1063,29 @@ totem_embedded_update_menu (TotemEmbedde
 }
 
 static void
+totem_embedded_toggle_fullscreen (TotemEmbedded *emb)
+{
+	GtkWidget * container;
+	container = glade_xml_get_widget (emb->xml, "content_box");
+
+	if (emb->fullscreen) {
+		bacon_video_widget_set_fullscreen (emb->bvw, FALSE);
+		gtk_widget_reparent (GTK_WIDGET (container), emb->window);
+		gtk_widget_destroy (emb->fullscreen_window);
+		emb->fullscreen_window = NULL;
+	} else {
+		emb->fullscreen_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+		gtk_widget_realize (GTK_WIDGET (emb->fullscreen_window));
+		gtk_widget_reparent (GTK_WIDGET (container), emb->fullscreen_window);
+		bacon_video_widget_set_fullscreen (emb->bvw, TRUE);
+		gtk_window_fullscreen (GTK_WINDOW (emb->fullscreen_window));
+		gtk_widget_show (GTK_WIDGET (emb->fullscreen_window));
+	}
+
+	emb->fullscreen = !(emb->fullscreen);
+}
+
+static void
 on_open1_activate (GtkButton *button, TotemEmbedded *emb)
 {
 	GTimeVal val;
@@ -1222,6 +1249,9 @@ on_video_button_press_event (BaconVideoW
 				event->button, event->time);
 
 		handled = TRUE;
+	} else if (event->type == GDK_BUTTON_PRESS &&
+		   event->button == 2) {
+		totem_embedded_toggle_fullscreen (emb);
 	}
 
 	return handled;
