To: vim_dev@googlegroups.com Subject: Patch 7.3.234 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.234 Problem: With GTK menu may be popping down. Solution: Use event time instead of GDK_CURRENT_TIME. (Hong Xu) Files: src/gui.c, src/gui.h, src/gui_gtk.c, src/gui_gtk_x11.c *** ../vim-7.3.233/src/gui.c 2011-06-20 00:53:10.000000000 +0200 --- src/gui.c 2011-06-26 04:38:09.000000000 +0200 *************** *** 84,89 **** --- 84,93 ---- 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; *** ../vim-7.3.233/src/gui.h 2011-05-10 16:41:13.000000000 +0200 --- src/gui.h 2011-06-26 04:41:21.000000000 +0200 *************** *** 401,406 **** --- 401,408 ---- 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) \ *** ../vim-7.3.233/src/gui_gtk.c 2011-01-17 20:08:03.000000000 +0100 --- src/gui_gtk.c 2011-06-26 04:38:09.000000000 +0200 *************** *** 1391,1397 **** gtk_menu_popup(GTK_MENU(menu->submenu_id), NULL, NULL, (GtkMenuPositionFunc)NULL, NULL, ! 3U, (guint32)GDK_CURRENT_TIME); } /* Ugly global variable to pass "mouse_pos" flag from gui_make_popup() to --- 1391,1397 ---- gtk_menu_popup(GTK_MENU(menu->submenu_id), NULL, NULL, (GtkMenuPositionFunc)NULL, NULL, ! 3U, gui.event_time); } /* Ugly global variable to pass "mouse_pos" flag from gui_make_popup() to *** ../vim-7.3.233/src/gui_gtk_x11.c 2011-06-19 01:14:22.000000000 +0200 --- src/gui_gtk_x11.c 2011-06-26 04:39:57.000000000 +0200 *************** *** 88,95 **** # include #endif - static guint32 clipboard_event_time = CurrentTime; - /* * Easy-to-use macro for multihead support. */ --- 88,93 ---- *************** *** 934,940 **** guint state; char_u *s, *d; ! clipboard_event_time = event->time; key_sym = event->keyval; state = event->state; --- 932,938 ---- guint state; char_u *s, *d; ! gui.event_time = event->time; key_sym = event->keyval; state = event->state; *************** *** 1129,1135 **** GdkEventKey *event, gpointer data UNUSED) { ! clipboard_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 --- 1127,1133 ---- GdkEventKey *event, gpointer data UNUSED) { ! 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 *************** *** 1622,1628 **** int x, y; int_u vim_modifiers; ! clipboard_event_time = event->time; /* Make sure we have focus now we've been selected */ if (gtk_socket_id != 0 && !GTK_WIDGET_HAS_FOCUS(widget)) --- 1620,1626 ---- int x, y; int_u vim_modifiers; ! 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)) *************** *** 1733,1739 **** int x, y; int_u vim_modifiers; ! clipboard_event_time = event->time; /* Remove any motion "machine gun" timers used for automatic further extension of allocation areas if outside of the applications window --- 1731,1737 ---- int x, y; int_u vim_modifiers; ! 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 *************** *** 5654,5660 **** int success; success = gtk_selection_owner_set(gui.drawarea, cbd->gtk_sel_atom, ! clipboard_event_time); gui_mch_update(); return (success) ? OK : FAIL; } --- 5652,5658 ---- int success; success = gtk_selection_owner_set(gui.drawarea, cbd->gtk_sel_atom, ! gui.event_time); gui_mch_update(); return (success) ? OK : FAIL; } *** ../vim-7.3.233/src/version.c 2011-06-26 04:25:24.000000000 +0200 --- src/version.c 2011-06-26 04:47:02.000000000 +0200 *************** *** 711,712 **** --- 711,714 ---- { /* Add new patch number below this line */ + /**/ + 234, /**/ -- hundred-and-one symptoms of being an internet addict: 225. You sign up for free subscriptions for all the computer magazines /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///