| To: vim_dev@googlegroups.com |
| Subject: Patch 7.3.234 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| 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 |
| |
| |
| |
| |
| |
| *** 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; |
| |
| |
| |
| *** 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) \ |
| |
| |
| |
| *** 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 |
| |
| |
| |
| *** 88,95 **** |
| # include <X11/Sunkeysym.h> |
| #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; |
| } |
| |
| |
| |
| *** 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 /// |