]>
Commit | Line | Data |
---|---|---|
a2e11672 AG |
1 | To: vim_dev@googlegroups.com |
2 | Subject: Patch 7.3.234 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.3.234 | |
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 | |
14 | ||
15 | ||
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 | |
18 | *************** | |
19 | *** 84,89 **** | |
20 | --- 84,93 ---- | |
21 | gui.starting = TRUE; | |
22 | full_screen = FALSE; | |
23 | ||
24 | + #ifdef FEAT_GUI_GTK | |
25 | + gui.event_time = GDK_CURRENT_TIME; | |
26 | + #endif | |
27 | + | |
28 | #ifdef MAY_FORK | |
29 | if (!gui.dofork || vim_strchr(p_go, GO_FORG) || recursive) | |
30 | dofork = FALSE; | |
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 | |
33 | *************** | |
34 | *** 401,406 **** | |
35 | --- 401,408 ---- | |
36 | GtkAccelGroup *accel_group; | |
37 | GtkWidget *filedlg; /* file selection dialog */ | |
38 | char_u *browse_fname; /* file name from filedlg */ | |
39 | + | |
40 | + guint32 event_time; | |
41 | #endif /* FEAT_GUI_GTK */ | |
42 | ||
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 | |
46 | *************** | |
47 | *** 1391,1397 **** | |
48 | gtk_menu_popup(GTK_MENU(menu->submenu_id), | |
49 | NULL, NULL, | |
50 | (GtkMenuPositionFunc)NULL, NULL, | |
51 | ! 3U, (guint32)GDK_CURRENT_TIME); | |
52 | } | |
53 | ||
54 | /* Ugly global variable to pass "mouse_pos" flag from gui_make_popup() to | |
55 | --- 1391,1397 ---- | |
56 | gtk_menu_popup(GTK_MENU(menu->submenu_id), | |
57 | NULL, NULL, | |
58 | (GtkMenuPositionFunc)NULL, NULL, | |
59 | ! 3U, gui.event_time); | |
60 | } | |
61 | ||
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 | |
65 | *************** | |
66 | *** 88,95 **** | |
67 | # include <X11/Sunkeysym.h> | |
68 | #endif | |
69 | ||
70 | - static guint32 clipboard_event_time = CurrentTime; | |
71 | - | |
72 | /* | |
73 | * Easy-to-use macro for multihead support. | |
74 | */ | |
75 | --- 88,93 ---- | |
76 | *************** | |
77 | *** 934,940 **** | |
78 | guint state; | |
79 | char_u *s, *d; | |
80 | ||
81 | ! clipboard_event_time = event->time; | |
82 | key_sym = event->keyval; | |
83 | state = event->state; | |
84 | ||
85 | --- 932,938 ---- | |
86 | guint state; | |
87 | char_u *s, *d; | |
88 | ||
89 | ! gui.event_time = event->time; | |
90 | key_sym = event->keyval; | |
91 | state = event->state; | |
92 | ||
93 | *************** | |
94 | *** 1129,1135 **** | |
95 | GdkEventKey *event, | |
96 | gpointer data UNUSED) | |
97 | { | |
98 | ! clipboard_event_time = event->time; | |
99 | /* | |
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 | |
102 | --- 1127,1133 ---- | |
103 | GdkEventKey *event, | |
104 | gpointer data UNUSED) | |
105 | { | |
106 | ! gui.event_time = event->time; | |
107 | /* | |
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 | |
110 | *************** | |
111 | *** 1622,1628 **** | |
112 | int x, y; | |
113 | int_u vim_modifiers; | |
114 | ||
115 | ! clipboard_event_time = event->time; | |
116 | ||
117 | /* Make sure we have focus now we've been selected */ | |
118 | if (gtk_socket_id != 0 && !GTK_WIDGET_HAS_FOCUS(widget)) | |
119 | --- 1620,1626 ---- | |
120 | int x, y; | |
121 | int_u vim_modifiers; | |
122 | ||
123 | ! gui.event_time = event->time; | |
124 | ||
125 | /* Make sure we have focus now we've been selected */ | |
126 | if (gtk_socket_id != 0 && !GTK_WIDGET_HAS_FOCUS(widget)) | |
127 | *************** | |
128 | *** 1733,1739 **** | |
129 | int x, y; | |
130 | int_u vim_modifiers; | |
131 | ||
132 | ! clipboard_event_time = event->time; | |
133 | ||
134 | /* Remove any motion "machine gun" timers used for automatic further | |
135 | extension of allocation areas if outside of the applications window | |
136 | --- 1731,1737 ---- | |
137 | int x, y; | |
138 | int_u vim_modifiers; | |
139 | ||
140 | ! gui.event_time = event->time; | |
141 | ||
142 | /* Remove any motion "machine gun" timers used for automatic further | |
143 | extension of allocation areas if outside of the applications window | |
144 | *************** | |
145 | *** 5654,5660 **** | |
146 | int success; | |
147 | ||
148 | success = gtk_selection_owner_set(gui.drawarea, cbd->gtk_sel_atom, | |
149 | ! clipboard_event_time); | |
150 | gui_mch_update(); | |
151 | return (success) ? OK : FAIL; | |
152 | } | |
153 | --- 5652,5658 ---- | |
154 | int success; | |
155 | ||
156 | success = gtk_selection_owner_set(gui.drawarea, cbd->gtk_sel_atom, | |
157 | ! gui.event_time); | |
158 | gui_mch_update(); | |
159 | return (success) ? OK : FAIL; | |
160 | } | |
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 | |
163 | *************** | |
164 | *** 711,712 **** | |
165 | --- 711,714 ---- | |
166 | { /* Add new patch number below this line */ | |
167 | + /**/ | |
168 | + 234, | |
169 | /**/ | |
170 | ||
171 | -- | |
172 | hundred-and-one symptoms of being an internet addict: | |
173 | 225. You sign up for free subscriptions for all the computer magazines | |
174 | ||
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 /// |