diff -r d94c32250814 src/globals.h
--- a/src/globals.h	Thu Dec 02 21:44:40 2010 +0100
+++ b/src/globals.h	Mon Dec 06 00:21:49 2010 +0800
@@ -1612,3 +1612,8 @@
 #ifdef FEAT_ARABIC
 # include "arabic.h"
 #endif
+
+#ifdef FEAT_GUI_GTK
+# include "gui_gtk_f.h"
+EXTERN guint32 gtk_event_time INIT(= GDK_CURRENT_TIME);
+#endif
diff -r d94c32250814 src/gui_gtk.c
--- a/src/gui_gtk.c	Thu Dec 02 21:44:40 2010 +0100
+++ b/src/gui_gtk.c	Mon Dec 06 00:21:49 2010 +0800
@@ -1390,7 +1390,7 @@
     gtk_menu_popup(GTK_MENU(menu->submenu_id),
 		   NULL, NULL,
 		   (GtkMenuPositionFunc)NULL, NULL,
-		   3U, (guint32)GDK_CURRENT_TIME);
+		   3U, gtk_event_time);
 }
 
 /* Ugly global variable to pass "mouse_pos" flag from gui_make_popup() to
diff -r d94c32250814 src/gui_gtk_x11.c
--- a/src/gui_gtk_x11.c	Thu Dec 02 21:44:40 2010 +0100
+++ b/src/gui_gtk_x11.c	Mon Dec 06 00:21:49 2010 +0800
@@ -86,7 +86,6 @@
 
 #ifdef HAVE_X11_SUNKEYSYM_H
 # include <X11/Sunkeysym.h>
-static guint32 clipboard_event_time = CurrentTime;
 #endif
 
 /*
@@ -933,7 +932,7 @@
     guint	state;
     char_u	*s, *d;
 
-    clipboard_event_time = event->time;
+    gtk_event_time = event->time;
     key_sym = event->keyval;
     state = event->state;
 
@@ -1128,7 +1127,7 @@
 		  GdkEventKey *event,
 		  gpointer data UNUSED)
 {
-    clipboard_event_time = event->time;
+    gtk_event_time = event->time;
     /*
      * GTK+ 2 input methods may do fancy stuff on key release events too.
      * With the default IM for instance, you can enter any UCS code point
@@ -1622,7 +1621,7 @@
     int x, y;
     int_u vim_modifiers;
 
-    clipboard_event_time = event->time;
+    gtk_event_time = event->time;
 
     /* Make sure we have focus now we've been selected */
     if (gtk_socket_id != 0 && !GTK_WIDGET_HAS_FOCUS(widget))
@@ -1733,7 +1732,7 @@
     int x, y;
     int_u vim_modifiers;
 
-    clipboard_event_time = event->time;
+    gtk_event_time = event->time;
 
     /* Remove any motion "machine gun" timers used for automatic further
        extension of allocation areas if outside of the applications window
@@ -5654,7 +5653,7 @@
     int success;
 
     success = gtk_selection_owner_set(gui.drawarea, cbd->gtk_sel_atom,
-				      clipboard_event_time);
+				      gtk_event_time);
     gui_mch_update();
     return (success) ? OK : FAIL;
 }
