1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: With GTK menu may be popping down.
12 Solution: Use event time instead of GDK_CURRENT_TIME. (Hong Xu)
13 Files: src/gui.c, src/gui.h, src/gui_gtk.c, src/gui_gtk_x11.c
16 *** ../vim-7.3.233/src/gui.c 2011-06-20 00:53:10.000000000 +0200
17 --- src/gui.c 2011-06-26 04:38:09.000000000 +0200
25 + gui.event_time = GDK_CURRENT_TIME;
29 if (!gui.dofork || vim_strchr(p_go, GO_FORG) || recursive)
31 *** ../vim-7.3.233/src/gui.h 2011-05-10 16:41:13.000000000 +0200
32 --- src/gui.h 2011-06-26 04:41:21.000000000 +0200
36 GtkAccelGroup *accel_group;
37 GtkWidget *filedlg; /* file selection dialog */
38 char_u *browse_fname; /* file name from filedlg */
41 #endif /* FEAT_GUI_GTK */
43 #if defined(FEAT_GUI_TABLINE) \
44 *** ../vim-7.3.233/src/gui_gtk.c 2011-01-17 20:08:03.000000000 +0100
45 --- src/gui_gtk.c 2011-06-26 04:38:09.000000000 +0200
48 gtk_menu_popup(GTK_MENU(menu->submenu_id),
50 (GtkMenuPositionFunc)NULL, NULL,
51 ! 3U, (guint32)GDK_CURRENT_TIME);
54 /* Ugly global variable to pass "mouse_pos" flag from gui_make_popup() to
56 gtk_menu_popup(GTK_MENU(menu->submenu_id),
58 (GtkMenuPositionFunc)NULL, NULL,
59 ! 3U, gui.event_time);
62 /* Ugly global variable to pass "mouse_pos" flag from gui_make_popup() to
63 *** ../vim-7.3.233/src/gui_gtk_x11.c 2011-06-19 01:14:22.000000000 +0200
64 --- src/gui_gtk_x11.c 2011-06-26 04:39:57.000000000 +0200
67 # include <X11/Sunkeysym.h>
70 - static guint32 clipboard_event_time = CurrentTime;
73 * Easy-to-use macro for multihead support.
81 ! clipboard_event_time = event->time;
82 key_sym = event->keyval;
89 ! gui.event_time = event->time;
90 key_sym = event->keyval;
98 ! clipboard_event_time = event->time;
100 * GTK+ 2 input methods may do fancy stuff on key release events too.
101 * With the default IM for instance, you can enter any UCS code point
104 gpointer data UNUSED)
106 ! gui.event_time = event->time;
108 * GTK+ 2 input methods may do fancy stuff on key release events too.
109 * With the default IM for instance, you can enter any UCS code point
115 ! clipboard_event_time = event->time;
117 /* Make sure we have focus now we've been selected */
118 if (gtk_socket_id != 0 && !GTK_WIDGET_HAS_FOCUS(widget))
123 ! gui.event_time = event->time;
125 /* Make sure we have focus now we've been selected */
126 if (gtk_socket_id != 0 && !GTK_WIDGET_HAS_FOCUS(widget))
132 ! clipboard_event_time = event->time;
134 /* Remove any motion "machine gun" timers used for automatic further
135 extension of allocation areas if outside of the applications window
140 ! gui.event_time = event->time;
142 /* Remove any motion "machine gun" timers used for automatic further
143 extension of allocation areas if outside of the applications window
148 success = gtk_selection_owner_set(gui.drawarea, cbd->gtk_sel_atom,
149 ! clipboard_event_time);
151 return (success) ? OK : FAIL;
156 success = gtk_selection_owner_set(gui.drawarea, cbd->gtk_sel_atom,
159 return (success) ? OK : FAIL;
161 *** ../vim-7.3.233/src/version.c 2011-06-26 04:25:24.000000000 +0200
162 --- src/version.c 2011-06-26 04:47:02.000000000 +0200
166 { /* Add new patch number below this line */
172 hundred-and-one symptoms of being an internet addict:
173 225. You sign up for free subscriptions for all the computer magazines
175 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
176 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
177 \\\ an exciting new programming language -- http://www.Zimbu.org ///
178 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///