Index: gnome-panel/panel-action-button.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-action-button.c,v
retrieving revision 1.28
diff -p -u -r1.28 panel-action-button.c
--- gnome-panel/panel-action-button.c	11 Aug 2004 14:40:38 -0000	1.28
+++ gnome-panel/panel-action-button.c	18 Aug 2004 15:39:45 -0000
@@ -179,7 +179,7 @@ panel_action_logout (GtkWidget *widget)
 void
 panel_action_run_program (GtkWidget *widget)
 {
-	panel_run_dialog_present (gtk_widget_get_screen (widget));
+	panel_run_dialog_present (gtk_widget_get_screen (widget), gtk_get_current_event_time ());
 }
 
 /* Search For Files
Index: gnome-panel/panel-action-protocol.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-action-protocol.c,v
retrieving revision 1.7
diff -p -u -r1.7 panel-action-protocol.c
--- gnome-panel/panel-action-protocol.c	10 Dec 2003 17:47:54 -0000	1.7
+++ gnome-panel/panel-action-protocol.c	18 Aug 2004 15:39:45 -0000
@@ -77,9 +77,10 @@ panel_action_protocol_main_menu (GdkScre
 }
 
 static void
-panel_action_protocol_run_dialog (GdkScreen *screen)
+panel_action_protocol_run_dialog (GdkScreen *screen,
+				  guint32    activate_time)
 {
-	panel_run_dialog_present (screen);
+	panel_run_dialog_present (screen, activate_time);
 }
 
 static GdkFilterReturn
@@ -106,7 +107,7 @@ panel_action_protocol_filter (GdkXEvent 
 	if (xevent->xclient.data.l [0] == atom_gnome_panel_action_main_menu)
 		panel_action_protocol_main_menu (screen, xevent->xclient.data.l [1]);
 	else if (xevent->xclient.data.l [0] == atom_gnome_panel_action_run_dialog)
-		panel_action_protocol_run_dialog (screen);
+		panel_action_protocol_run_dialog (screen, xevent->xclient.data.l [1]);
 	else
 		return GDK_FILTER_CONTINUE;
 
Index: gnome-panel/panel-run-dialog.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-run-dialog.c,v
retrieving revision 1.28
diff -p -u -r1.28 panel-run-dialog.c
--- gnome-panel/panel-run-dialog.c	28 May 2004 09:59:57 -0000	1.28
+++ gnome-panel/panel-run-dialog.c	18 Aug 2004 15:39:45 -0000
@@ -1505,10 +1505,11 @@ panel_run_dialog_setup_pixmap (PanelRunD
 				  PANEL_STOCK_RUN,
 				  GTK_ICON_SIZE_DIALOG);
 }
-				
+
 static PanelRunDialog *
 panel_run_dialog_new (GdkScreen *screen,
-		      GladeXML  *gui)
+		      GladeXML  *gui,
+		      guint32    activate_time)
 {
 	PanelRunDialog *dialog;
 
@@ -1543,6 +1544,8 @@ panel_run_dialog_new (GdkScreen *screen,
 	set_window_icon_from_stock (GTK_WINDOW (dialog->run_dialog), PANEL_STOCK_RUN);
 
 	gtk_widget_grab_focus (dialog->gtk_entry);
+	gtk_widget_realize (dialog->run_dialog);
+	panel_gdk_x11_window_set_user_time (dialog->run_dialog->window, activate_time);
 	gtk_widget_show (dialog->run_dialog);
 	
 	return dialog;
@@ -1556,7 +1559,8 @@ panel_run_dialog_static_dialog_destroyed
 }
 
 void
-panel_run_dialog_present (GdkScreen *screen)
+panel_run_dialog_present (GdkScreen *screen,
+			  guint32    activate_time)
 {
 	GladeXML *gui;
 
@@ -1565,6 +1569,7 @@ panel_run_dialog_present (GdkScreen *scr
 
 	if (static_dialog) {
 		gtk_window_set_screen (GTK_WINDOW (static_dialog->run_dialog), screen);
+		panel_gdk_x11_window_set_user_time (static_dialog->run_dialog->window, activate_time);
 		gtk_window_present (GTK_WINDOW (static_dialog->run_dialog));
 		gtk_widget_grab_focus (static_dialog->gtk_entry);
 		return;
@@ -1574,7 +1579,7 @@ panel_run_dialog_present (GdkScreen *scr
 			     "panel_run_dialog",
 			     NULL);
 
-	static_dialog = panel_run_dialog_new (screen, gui);
+	static_dialog = panel_run_dialog_new (screen, gui, activate_time);
 
 	g_signal_connect_swapped (static_dialog->run_dialog, "destroy",
 				  G_CALLBACK (panel_run_dialog_static_dialog_destroyed),
@@ -1585,9 +1590,10 @@ panel_run_dialog_present (GdkScreen *scr
 
 void
 panel_run_dialog_present_with_text (GdkScreen  *screen,
-				    const char *text)
+				    const char *text,
+				    guint32    activate_time)
 {
-	panel_run_dialog_present (screen);
+	panel_run_dialog_present (screen, activate_time);
 	
 	if (static_dialog)
 		gtk_entry_set_text (GTK_ENTRY (static_dialog->gtk_entry), text);
Index: gnome-panel/panel-run-dialog.h
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-run-dialog.h,v
retrieving revision 1.1
diff -p -u -r1.1 panel-run-dialog.h
--- gnome-panel/panel-run-dialog.h	19 May 2003 16:05:25 -0000	1.1
+++ gnome-panel/panel-run-dialog.h	18 Aug 2004 15:39:45 -0000
@@ -29,9 +29,11 @@
 
 G_BEGIN_DECLS
 
-void panel_run_dialog_present           (GdkScreen  *screen);
+void panel_run_dialog_present           (GdkScreen  *screen,
+					 guint32    activate_time);
 void panel_run_dialog_present_with_text (GdkScreen  *screen,
-					 const char *text);
+					 const char *text,
+					 guint32    activate_time);
 
 G_END_DECLS
 
Index: gnome-panel/panel-xutils.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-xutils.c,v
retrieving revision 1.4
diff -p -u -r1.4 panel-xutils.c
--- gnome-panel/panel-xutils.c	9 Jul 2003 10:05:32 -0000	1.4
+++ gnome-panel/panel-xutils.c	18 Aug 2004 15:39:45 -0000
@@ -170,3 +170,30 @@ panel_warp_pointer (GdkWindow *gdk_windo
 	XWarpPointer (display, None, window, 0, 0, 0, 0, x, y);
 	gdk_error_trap_pop ();
 }
+
+/* FIXME: When we switch to gtk+-2.6, use of this function should be
+ * replaced by using the real gdk_x11_window_set_user_time.  Also,
+ * think of the code style mismatch (e.g. 2 spaces instead of tabs) as
+ * an extra reminder to nuke this function.  :-)
+ */
+void
+panel_gdk_x11_window_set_user_time (GdkWindow *window,
+				    guint32    timestamp)
+{
+  GdkDisplay *display;
+  glong timestamp_long = (glong)timestamp;
+
+  g_return_if_fail (window != NULL);
+  g_return_if_fail (GDK_IS_WINDOW (window));
+
+  if (GDK_WINDOW_DESTROYED (window))
+    return;
+
+  display = gdk_drawable_get_display (window);
+
+  XChangeProperty (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (window),
+                   gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_USER_TIME"),
+                   XA_CARDINAL, 32, PropModeReplace,
+                   (guchar *)&timestamp_long, 1);
+}
+
Index: gnome-panel/panel-xutils.h
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-xutils.h,v
retrieving revision 1.4
diff -p -u -r1.4 panel-xutils.h
--- gnome-panel/panel-xutils.h	16 Jan 2004 14:30:21 -0000	1.4
+++ gnome-panel/panel-xutils.h	18 Aug 2004 15:39:45 -0000
@@ -54,6 +54,12 @@ void panel_warp_pointer           (GdkWi
 				   int                    x,
 				   int                    y);
 
+/* FIXME: When we switch to gtk+-2.6, use of this function should be
+ * replaced by using the real gdk_x11_window_set_user_time.
+ */
+void panel_gdk_x11_window_set_user_time (GdkWindow *window,
+					 guint32    timestamp);
+
 G_END_DECLS
 
 #endif /* __PANEL_XUTILS_H__ */
