forked from AuroraMiddleware/gtk
macos: Fix clipboard data size handling
We were using the allocated memory size, not the amount of data that has been written. Fixes: #5261
This commit is contained in:
parent
004f22a51c
commit
6f5d18a9f5
@ -440,7 +440,7 @@ on_data_ready_cb (GObject *object,
|
|||||||
|
|
||||||
g_output_stream_close (G_OUTPUT_STREAM (wr->stream), NULL, NULL);
|
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);
|
bytes = g_memory_output_stream_steal_data (wr->stream);
|
||||||
data = [[NSData alloc] initWithBytesNoCopy:bytes
|
data = [[NSData alloc] initWithBytesNoCopy:bytes
|
||||||
length:size
|
length:size
|
||||||
|
Loading…
Reference in New Issue
Block a user