Romain Vimont
173ac56880
Make message buffer static
...
Now that the message max size is 256k, do not put the buffer on the
stack.
2020-06-04 23:50:08 +02:00
Romain Vimont
913a9f3694
Increase clipboard size from 4k to 256k
...
Beyond 256k, SDL_GetClipboardText() returns an empty string on my
computer.
Fixes #1117 <https://github.com/Genymobile/scrcpy/issues/1117 >
2020-06-04 23:37:28 +02:00
Romain Vimont
d9fd3117ff
Fix receiver on partial device messages
...
If a single device message was read in several chunks from the control
socket, the communication was broken.
2020-06-04 23:33:21 +02:00
Romain Vimont
18ea1a442b
Serialize text size on 4 bytes
...
This will allow to send text having a size greater than 65535 bytes.
2020-06-04 23:33:21 +02:00
Romain Vimont
13f95865dc
Rename MSG_SERIALIZED_MAX_SIZE to MSG_MAX_SIZE
...
For simplicity and consistency with the server part.
2020-06-04 21:45:02 +02:00
Romain Vimont
808a9cad90
Add unit test for big clipboard device message
...
Test clipboard synchronization from the device to the computer.
2020-06-04 21:45:02 +02:00
Romain Vimont
80e799a6f4
Rename test names from "event" to "msg"
...
The meson test names had not been changed when "event" had been renamed
to "message".
Ref: 28980bbc90
2020-06-04 21:45:02 +02:00
Romain Vimont
914b4dbebc
Reorganize message size constants
...
Make the max clipboard text length depend on the max message size.
2020-06-04 21:36:40 +02:00
Romain Vimont
64749c4a44
Avoid additional copy on Java text parsing
...
Directly pass the buffer range to the String constructor.
2020-06-04 21:04:49 +02:00
Romain Vimont
a162725f0e
Update copy-paste section in README
...
Update documentation regarding the recent copy-paste changes.
2020-06-04 21:04:49 +02:00
Romain Vimont
cc6a43f033
Forward copy-cut shortcuts
...
For convenience, forward RCtrl+c (or Cmd+c) and and RCtrl+x (or Cmd+x)
as LCtrl+c and LCtrl+x to the device.
This allows to use the "natural" keys for copy-paste (especially on
macOS).
2020-06-04 21:04:49 +02:00
Romain Vimont
2fcb1ce58c
Change "resize to fit" shortcut to RCtrl+w
...
For convenience, RCtrl+x (and Cmd+x) will be used for "cut text to
clipboard", in addition to LCtrl+x.
2020-06-04 21:04:49 +02:00
Romain Vimont
ded6215362
Accept Cmd for shortcuts on macOS
...
For convenience (and to keep the existing behavior), also accept
shortcuts using Cmd instead of RCtrl.
2020-06-04 21:04:49 +02:00
Romain Vimont
a253164237
Reformulate RCtrl+v description
...
RCtrl+v is the only scrcpy shortcut related to copy-paste. Since it's
not a real "paste", reformulate to indicate that it injects the
clipboard content as text events.
2020-06-04 21:04:49 +02:00
Romain Vimont
2df8c33f62
Remove "paste on set clipboard" feature
...
Now that content is pasted on Ctrl+v, the hack to send the PASTE keycode
(for Android >= 7 only) is obsolete. Remove it.
This reverts fc1dec0270 .
2020-06-04 21:04:49 +02:00
Romain Vimont
793db5a77e
Remove RCtrl+c copy shortcut
...
Now that Ctrl+c is forwarded to the device, and that every device
clipboard change is automatically synchronized to the computer, RCtrl+c
is useless.
2020-06-04 21:03:36 +02:00
Romain Vimont
8700ad74b9
Remove RCtrl+Shift+v paste shortcut
...
Now that LCtrl+v synchronize the computer clipboard to the device
clipboard, RCtrl+Shift+v is not needed anymore.
Note: RCtrl+v is kept to send the computer clipboard content as a
sequence of keys.
2020-06-04 21:02:35 +02:00