forked from shaba/openuds
Fixed clipboard (partially) for guacamole
This commit is contained in:
parent
5c5ddd147c
commit
5e4114c719
@ -88,7 +88,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.guacamole</groupId>
|
||||
<artifactId>guacamole-common-js</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<version>1.2.0</version>
|
||||
<type>zip</type>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
@ -1067,7 +1067,17 @@ GuacUI.Client.setClipboard = function(data) {
|
||||
|
||||
if (data !== GuacUI.Client.remote_clipboard && GuacUI.Client.attachedClient) {
|
||||
GuacUI.Client.remote_clipboard = data;
|
||||
GuacUI.Client.attachedClient.setClipboard(data);
|
||||
//GuacUI.Client.attachedClient.setClipboard(data);
|
||||
// Old setClipboard funtion
|
||||
var stream = GuacUI.Client.attachedClient.createClipboardStream('text/plain')
|
||||
var writer = new Guacamole.StringWriter(stream);
|
||||
|
||||
// Send text chunks
|
||||
for (var i=0; i<data.length; i += 4096)
|
||||
writer.sendText(data.substring(i, i+4096));
|
||||
|
||||
// Close stream
|
||||
writer.sendEnd();
|
||||
}
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user