aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey2004-04-19 08:37:31 +0000
committerKaroly Lorentey2004-04-19 08:37:31 +0000
commita9711057f01b74aac7735892b32a424aadd0716c (patch)
treea8364af9ca90921bae879356b3969c095db660c1 /src
parent540216761e8c9105486b902c8eab89ffe6a09731 (diff)
parent455a2afc5fcca05595e428785142e9240b3a9da7 (diff)
downloademacs-a9711057f01b74aac7735892b32a424aadd0716c.tar.gz
emacs-a9711057f01b74aac7735892b32a424aadd0716c.zip
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-226 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-227 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-228 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-229 Remove TeX output files from the archive git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-146
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/w32select.c11
2 files changed, 14 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 702f3be6046..babc20c57c5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12004-04-18 Jason Rumney <jasonr@gnu.org>
2
3 * w32select.c (Fw32_set_clipboard_data): Get sequence number
4 after closing the clipboard.
5
12004-04-16 Luc Teirlinck <teirllm@auburn.edu> 62004-04-16 Luc Teirlinck <teirllm@auburn.edu>
2 7
3 * buffer.c (Fbuffer_base_buffer): Doc fix. 8 * buffer.c (Fbuffer_base_buffer): Doc fix.
diff --git a/src/w32select.c b/src/w32select.c
index 940cce35772..0c8849c7be6 100644
--- a/src/w32select.c
+++ b/src/w32select.c
@@ -259,11 +259,18 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data,
259 259
260 ok = EmptyClipboard () && SetClipboardData (CF_TEXT, htext); 260 ok = EmptyClipboard () && SetClipboardData (CF_TEXT, htext);
261 261
262 CloseClipboard ();
263
264 /* Common sense says to read the sequence number inside the
265 OpenClipboard/ CloseClipboard block to avoid race conditions
266 where another app puts something on the clipboard straight after
267 us. But experience suggests that the sequence number from the
268 SetClipboardData is not allocated until we close the clipboard!
269 Since clipboard operations are normally user-driven, the race
270 condition is probably not going to really happen. */
262 if (clipboard_sequence_fn) 271 if (clipboard_sequence_fn)
263 last_clipboard_sequence_number = clipboard_sequence_fn (); 272 last_clipboard_sequence_number = clipboard_sequence_fn ();
264 273
265 CloseClipboard ();
266
267 if (ok) goto done; 274 if (ok) goto done;
268 275
269 error: 276 error: