diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-06-22 06:07:12 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-06-22 06:07:12 +0200 |
commit | 7cfea75ed6897c81dc129490dd894b1ddeebf433 (patch) | |
tree | d81f412da1638d0f1ea7ee636fbfcfc78a5f2866 /src/gui_gtk_x11.c | |
parent | 370df58df9bba97fd5dd6f00595b2f41efda8383 (diff) | |
download | vim-git-7cfea75ed6897c81dc129490dd894b1ddeebf433.tar.gz |
Fixes for time in clipboard request. Also fix ownership. (David Fries)
Diffstat (limited to 'src/gui_gtk_x11.c')
-rw-r--r-- | src/gui_gtk_x11.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index 2db203b85..5cbe9a3c3 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -88,6 +88,7 @@ extern void bonobo_dock_item_set_behavior(BonoboDockItem *dock_item, BonoboDockI #ifdef HAVE_X11_SUNKEYSYM_H # include <X11/Sunkeysym.h> +static guint32 clipboard_event_time = CurrentTime; #endif /* @@ -996,6 +997,7 @@ key_press_event(GtkWidget *widget UNUSED, guint state; char_u *s, *d; + clipboard_event_time = event->time; key_sym = event->keyval; state = event->state; #ifndef HAVE_GTK2 /* deprecated */ @@ -1258,6 +1260,7 @@ key_release_event(GtkWidget *widget UNUSED, 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 @@ -1870,6 +1873,8 @@ button_press_event(GtkWidget *widget, 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)) gtk_widget_grab_focus(widget); @@ -1989,6 +1994,8 @@ button_release_event(GtkWidget *widget UNUSED, 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 area .*/ @@ -6883,7 +6890,7 @@ clip_mch_own_selection(VimClipboard *cbd) int success; success = gtk_selection_owner_set(gui.drawarea, cbd->gtk_sel_atom, - (guint32)GDK_CURRENT_TIME); + clipboard_event_time); gui_mch_update(); return (success) ? OK : FAIL; } |