projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
004f22a
)
macos: Fix clipboard data size handling
author
Matthias Clasen
<mclasen@redhat.com>
Mon, 17 Oct 2022 03:45:28 +0000
(23:45 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Mon, 17 Oct 2022 03:45:28 +0000
(23:45 -0400)
We were using the allocated memory size, not
the amount of data that has been written.
Fixes: #5261
gdk/macos/gdkmacosclipboard.c
patch
|
blob
|
history
diff --git
a/gdk/macos/gdkmacosclipboard.c
b/gdk/macos/gdkmacosclipboard.c
index 25f4669efb386943245f1b48de64d83bef12f74f..3a2667c0dfbbceffe883dbfe92b3240b4fea490b 100644
(file)
--- a/
gdk/macos/gdkmacosclipboard.c
+++ b/
gdk/macos/gdkmacosclipboard.c
@@
-440,7
+440,7
@@
on_data_ready_cb (GObject *object,
g_output_stream_close (G_OUTPUT_STREAM (wr->stream), NULL, NULL);
- size = g_memory_output_stream_get_size (wr->stream);
+ size = g_memory_output_stream_get_
data_
size (wr->stream);
bytes = g_memory_output_stream_steal_data (wr->stream);
data = [[NSData alloc] initWithBytesNoCopy:bytes
length:size