--- gnome-panel-2.20.1/gnome-panel/panel-toplevel.c	2007-10-15 17:00:47.000000000 -0300
+++ gnome-panel-2.20.1.patched/gnome-panel/panel-toplevel.c	2008-09-30 10:56:03.000000000 -0300
@@ -3173,12 +3173,35 @@
 				   GdkEventButton *event)
 {
 	PanelToplevel *toplevel;
+	GConfClient *client;
+	char *modifier_str = NULL;
+	guint modifier_keysym;
+	guint modifier_keymask;
 	GtkWidget     *event_widget;
 
 	g_return_val_if_fail (PANEL_IS_TOPLEVEL (widget), FALSE);
 
 	toplevel = PANEL_TOPLEVEL (widget);
 
+	/* Get the mouse-button modifier from metacity (falling back to mod1), don't let 
+         * the movement event through unless it is modified (prevents users from unintentionally
+         * moving the panel). 
+         **/
+	client = panel_gconf_get_client ();
+	modifier_str = gconf_client_get_string (client, "/apps/metacity/general/mouse_button_modifier",
+						NULL);	
+
+	if (modifier_str) {
+		gtk_accelerator_parse (modifier_str, &modifier_keysym, &modifier_keymask);
+		g_free(modifier_str);
+	} 
+	else {
+		modifier_keymask = GDK_MOD1_MASK;
+	}
+
+	if ((event->state & gtk_accelerator_get_default_mod_mask ()) != modifier_keymask)
+		return FALSE;
+
 	if (event->button != 1 && event->button != 2)
 		return FALSE;
 
