win32: clipboard fix
original commit: 4e7281768818743ef9c9b779affef23448dff344
This commit is contained in:
parent
9f4be33c93
commit
3b16f7a8e2
|
@ -148,11 +148,12 @@
|
||||||
;; no conversion:
|
;; no conversion:
|
||||||
d])))]
|
d])))]
|
||||||
[all-handles (for/list ([d (in-list all-data)])
|
[all-handles (for/list ([d (in-list all-data)])
|
||||||
|
(and d
|
||||||
(let ([h (GlobalAlloc GHND (bytes-length d))])
|
(let ([h (GlobalAlloc GHND (bytes-length d))])
|
||||||
(let ([p (GlobalLock h)])
|
(let ([p (GlobalLock h)])
|
||||||
(memcpy p d (bytes-length d)))
|
(memcpy p d (bytes-length d)))
|
||||||
(GlobalUnlock h)
|
(GlobalUnlock h)
|
||||||
h))])
|
h)))])
|
||||||
(if (null? types)
|
(if (null? types)
|
||||||
(drop-client c)
|
(drop-client c)
|
||||||
(atomically
|
(atomically
|
||||||
|
@ -161,7 +162,8 @@
|
||||||
(EmptyClipboard)
|
(EmptyClipboard)
|
||||||
(for ([t (in-list type-ids)]
|
(for ([t (in-list type-ids)]
|
||||||
[h (in-list all-handles)])
|
[h (in-list all-handles)])
|
||||||
(SetClipboardData t h))
|
(when h
|
||||||
|
(SetClipboardData t h)))
|
||||||
(if (CloseClipboard)
|
(if (CloseClipboard)
|
||||||
(set! client c)
|
(set! client c)
|
||||||
(drop-client c)))
|
(drop-client c)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user