249 |
|
|
250 |
ok = EmptyClipboard () && SetClipboardData (CF_TEXT, htext); |
ok = EmptyClipboard () && SetClipboardData (CF_TEXT, htext); |
251 |
|
|
252 |
|
CloseClipboard (); |
253 |
|
|
254 |
|
/* Common sense says to read the sequence number inside the |
255 |
|
OpenClipboard/ CloseClipboard block to avoid race conditions |
256 |
|
where another app puts something on the clipboard straight after |
257 |
|
us. But experience suggests that the sequence number from the |
258 |
|
SetClipboardData is not allocated until we close the clipboard! |
259 |
|
Since clipboard operations are normally user-driven, the race |
260 |
|
condition is probably not going to really happen. */ |
261 |
if (clipboard_sequence_fn) |
if (clipboard_sequence_fn) |
262 |
last_clipboard_sequence_number = clipboard_sequence_fn (); |
last_clipboard_sequence_number = clipboard_sequence_fn (); |
263 |
|
|
|
CloseClipboard (); |
|
|
|
|
264 |
if (ok) goto done; |
if (ok) goto done; |
265 |
|
|
266 |
error: |
error: |