mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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)
This commit is contained in:
@@ -84,6 +84,10 @@ gui_start()
|
|||||||
gui.starting = TRUE;
|
gui.starting = TRUE;
|
||||||
full_screen = FALSE;
|
full_screen = FALSE;
|
||||||
|
|
||||||
|
#ifdef FEAT_GUI_GTK
|
||||||
|
gui.event_time = GDK_CURRENT_TIME;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef MAY_FORK
|
#ifdef MAY_FORK
|
||||||
if (!gui.dofork || vim_strchr(p_go, GO_FORG) || recursive)
|
if (!gui.dofork || vim_strchr(p_go, GO_FORG) || recursive)
|
||||||
dofork = FALSE;
|
dofork = FALSE;
|
||||||
|
@@ -401,6 +401,8 @@ typedef struct Gui
|
|||||||
GtkAccelGroup *accel_group;
|
GtkAccelGroup *accel_group;
|
||||||
GtkWidget *filedlg; /* file selection dialog */
|
GtkWidget *filedlg; /* file selection dialog */
|
||||||
char_u *browse_fname; /* file name from filedlg */
|
char_u *browse_fname; /* file name from filedlg */
|
||||||
|
|
||||||
|
guint32 event_time;
|
||||||
#endif /* FEAT_GUI_GTK */
|
#endif /* FEAT_GUI_GTK */
|
||||||
|
|
||||||
#if defined(FEAT_GUI_TABLINE) \
|
#if defined(FEAT_GUI_TABLINE) \
|
||||||
|
@@ -1391,7 +1391,7 @@ gui_mch_show_popupmenu(vimmenu_T *menu)
|
|||||||
gtk_menu_popup(GTK_MENU(menu->submenu_id),
|
gtk_menu_popup(GTK_MENU(menu->submenu_id),
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
(GtkMenuPositionFunc)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
|
/* Ugly global variable to pass "mouse_pos" flag from gui_make_popup() to
|
||||||
|
@@ -88,8 +88,6 @@ extern void bonobo_dock_item_set_behavior(BonoboDockItem *dock_item, BonoboDockI
|
|||||||
# include <X11/Sunkeysym.h>
|
# include <X11/Sunkeysym.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static guint32 clipboard_event_time = CurrentTime;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Easy-to-use macro for multihead support.
|
* Easy-to-use macro for multihead support.
|
||||||
*/
|
*/
|
||||||
@@ -934,7 +932,7 @@ key_press_event(GtkWidget *widget UNUSED,
|
|||||||
guint state;
|
guint state;
|
||||||
char_u *s, *d;
|
char_u *s, *d;
|
||||||
|
|
||||||
clipboard_event_time = event->time;
|
gui.event_time = event->time;
|
||||||
key_sym = event->keyval;
|
key_sym = event->keyval;
|
||||||
state = event->state;
|
state = event->state;
|
||||||
|
|
||||||
@@ -1129,7 +1127,7 @@ key_release_event(GtkWidget *widget UNUSED,
|
|||||||
GdkEventKey *event,
|
GdkEventKey *event,
|
||||||
gpointer data UNUSED)
|
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.
|
* 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
|
* With the default IM for instance, you can enter any UCS code point
|
||||||
@@ -1622,7 +1620,7 @@ button_press_event(GtkWidget *widget,
|
|||||||
int x, y;
|
int x, y;
|
||||||
int_u vim_modifiers;
|
int_u vim_modifiers;
|
||||||
|
|
||||||
clipboard_event_time = event->time;
|
gui.event_time = event->time;
|
||||||
|
|
||||||
/* Make sure we have focus now we've been selected */
|
/* Make sure we have focus now we've been selected */
|
||||||
if (gtk_socket_id != 0 && !GTK_WIDGET_HAS_FOCUS(widget))
|
if (gtk_socket_id != 0 && !GTK_WIDGET_HAS_FOCUS(widget))
|
||||||
@@ -1733,7 +1731,7 @@ button_release_event(GtkWidget *widget UNUSED,
|
|||||||
int x, y;
|
int x, y;
|
||||||
int_u vim_modifiers;
|
int_u vim_modifiers;
|
||||||
|
|
||||||
clipboard_event_time = event->time;
|
gui.event_time = event->time;
|
||||||
|
|
||||||
/* Remove any motion "machine gun" timers used for automatic further
|
/* Remove any motion "machine gun" timers used for automatic further
|
||||||
extension of allocation areas if outside of the applications window
|
extension of allocation areas if outside of the applications window
|
||||||
@@ -5654,7 +5652,7 @@ clip_mch_own_selection(VimClipboard *cbd)
|
|||||||
int success;
|
int success;
|
||||||
|
|
||||||
success = gtk_selection_owner_set(gui.drawarea, cbd->gtk_sel_atom,
|
success = gtk_selection_owner_set(gui.drawarea, cbd->gtk_sel_atom,
|
||||||
clipboard_event_time);
|
gui.event_time);
|
||||||
gui_mch_update();
|
gui_mch_update();
|
||||||
return (success) ? OK : FAIL;
|
return (success) ? OK : FAIL;
|
||||||
}
|
}
|
||||||
|
@@ -709,6 +709,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
234,
|
||||||
/**/
|
/**/
|
||||||
233,
|
233,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user