--- totem (orginal).c	2006-10-13 16:28:12.000000000 +0200
+++ totem.c	2006-11-05 17:21:19.000000000 +0100
@@ -39,6 +39,8 @@
 #endif /* !HAVE_GTK_ONLY */
 
 #include <string.h>
+#include <math.h>
+#include <time.h>
 
 /* X11 headers */
 #include <gdk/gdkx.h>
@@ -82,6 +84,11 @@
 #define ZOOM_LOWER 10
 
 #define FULLSCREEN_POPUP_TIMEOUT 5 * 1000
+// Distance the cursor needs to be moved for the controls to pop up
+#define FULLSCREEN_POPUP_MOVEMENT_REQUIRED 50  // percentage of screen width
+// Not moving the mouse in this amount of time resets the movement counter
+#define FULLSCREEN_POPUP_MOVEMENT_TIMEOUT 3     // seconds
+
 
 #define BVW_VBOX_BORDER_WIDTH 1
 
@@ -2281,6 +2288,11 @@ on_video_motion_notify_event (GtkWidget 
 		Totem *totem)
 {
 	GtkWidget *item;
+	gboolean show_controls = FALSE;
+	int movement_required;
+	static int last_x=0, last_y=0, total_movement=0;
+	static time_t last_movement_time = 0;
+	
 
 	if (totem_is_fullscreen (totem) == FALSE) 
 		return FALSE;
@@ -2289,20 +2301,50 @@ on_video_motion_notify_event (GtkWidget 
 		return FALSE;
 
 	totem->popup_in_progress = TRUE;
+	
+	
+	// Wheel events propagate here with a NULL event variable
+	if(event == NULL)
+		show_controls = TRUE;
+	else
+	{
+		time_t now = time(NULL);
+		// Timeout? Then reset the distance moved...
+		if (difftime(now, last_movement_time) > FULLSCREEN_POPUP_MOVEMENT_TIMEOUT)
+		{
+	 		total_movement = 0;	 	
+			last_x = event->x;
+			last_y = event->y;
+		}
+		// Calculate cursors distance since last event
+		total_movement += (int) sqrt( pow(event->x - last_x, 2) + pow(event->y - last_y,2));
+		
+		movement_required = (int)(totem->fullscreen_rect.width * (FULLSCREEN_POPUP_MOVEMENT_REQUIRED / (double)100));
+		if(total_movement > movement_required)
+			show_controls = TRUE;
 
-	popup_timeout_remove (totem);
+		last_movement_time = now;
+		last_x = event->x;
+		last_y = event->y;
+	}
 
-	item = glade_xml_get_widget (totem->xml, "tcw_hbox");
-	gtk_widget_show_all (item);
-	gdk_flush ();
+	if(show_controls == TRUE)
+	{
+		popup_timeout_remove (totem);
 
-	move_popups (totem);
+		item = glade_xml_get_widget (totem->xml, "tcw_hbox");
+		gtk_widget_show_all (item);
+		gdk_flush ();
 
-	gtk_widget_show_all (totem->exit_popup);
-	gtk_widget_show_all (totem->control_popup);
-	totem_action_set_cursor (totem, TRUE);
+		move_popups (totem);
+
+		gtk_widget_show_all (totem->exit_popup);
+		gtk_widget_show_all (totem->control_popup);
+		totem_action_set_cursor (totem, TRUE);
+
+		popup_timeout_add (totem);
+	}
 
-	popup_timeout_add (totem);
 	totem->popup_in_progress = FALSE;
 
 	return FALSE;
