summaryrefslogtreecommitdiff
path: root/source/ap/vim/patches/7.3.234
blob: a60df3db17cc672ceea042402ff9f0032e813205 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
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


*** ../vim-7.3.233/src/gui.c	2011-06-20 00:53:10.000000000 +0200
--- src/gui.c	2011-06-26 04:38:09.000000000 +0200
***************
*** 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;
*** ../vim-7.3.233/src/gui.h	2011-05-10 16:41:13.000000000 +0200
--- src/gui.h	2011-06-26 04:41:21.000000000 +0200
***************
*** 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) \
*** ../vim-7.3.233/src/gui_gtk.c	2011-01-17 20:08:03.000000000 +0100
--- src/gui_gtk.c	2011-06-26 04:38:09.000000000 +0200
***************
*** 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
*** ../vim-7.3.233/src/gui_gtk_x11.c	2011-06-19 01:14:22.000000000 +0200
--- src/gui_gtk_x11.c	2011-06-26 04:39:57.000000000 +0200
***************
*** 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;
  }
*** ../vim-7.3.233/src/version.c	2011-06-26 04:25:24.000000000 +0200
--- src/version.c	2011-06-26 04:47:02.000000000 +0200
***************
*** 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    ///