Commits

Anonymous committed 7653420

updated for version 7.3.234
Problem: With GTK menu may be popping down.
Solution: Use event time instead of GDK_CURRENT_TIME. (Hong Xu)

  • Participants
  • Parent commits c3a6382
  • Tags v7-3-234

Comments (0)

Files changed (5)

     gui.starting = TRUE;
     full_screen = FALSE;
 
+#ifdef FEAT_GUI_GTK
+    gui.event_time = GDK_CURRENT_TIME;
+#endif
+
 #ifdef MAY_FORK
     if (!gui.dofork || vim_strchr(p_go, GO_FORG) || recursive)
 	dofork = FALSE;
     GtkAccelGroup *accel_group;
     GtkWidget	*filedlg;	    /* file selection dialog */
     char_u	*browse_fname;	    /* file name from filedlg */
+
+    guint32	event_time;
 #endif	/* FEAT_GUI_GTK */
 
 #if defined(FEAT_GUI_TABLINE) \

File src/gui_gtk.c

     gtk_menu_popup(GTK_MENU(menu->submenu_id),
 		   NULL, NULL,
 		   (GtkMenuPositionFunc)NULL, NULL,
-		   3U, (guint32)GDK_CURRENT_TIME);
+		   3U, gui.event_time);
 }
 
 /* Ugly global variable to pass "mouse_pos" flag from gui_make_popup() to

File src/gui_gtk_x11.c

 # include <X11/Sunkeysym.h>
 #endif
 
-static guint32 clipboard_event_time = CurrentTime;
-
 /*
  * Easy-to-use macro for multihead support.
  */
     guint	state;
     char_u	*s, *d;
 
-    clipboard_event_time = event->time;
+    gui.event_time = event->time;
     key_sym = event->keyval;
     state = event->state;
 
 		  GdkEventKey *event,
 		  gpointer data UNUSED)
 {
-    clipboard_event_time = event->time;
+    gui.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
     int x, y;
     int_u vim_modifiers;
 
-    clipboard_event_time = event->time;
+    gui.event_time = event->time;
 
     /* Make sure we have focus now we've been selected */
     if (gtk_socket_id != 0 && !GTK_WIDGET_HAS_FOCUS(widget))
     int x, y;
     int_u vim_modifiers;
 
-    clipboard_event_time = event->time;
+    gui.event_time = event->time;
 
     /* Remove any motion "machine gun" timers used for automatic further
        extension of allocation areas if outside of the applications window
     int success;
 
     success = gtk_selection_owner_set(gui.drawarea, cbd->gtk_sel_atom,
-				      clipboard_event_time);
+				      gui.event_time);
     gui_mch_update();
     return (success) ? OK : FAIL;
 }

File src/version.c

 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    234,
+/**/
     233,
 /**/
     232,