xpra icon
Bug tracker and wiki

Ticket #1461: html5-clipboard-sleep.patch

File html5-clipboard-sleep.patch, 561 bytes (added by Antoine Martin, 3 years ago)

busy wait for 150ms so the server can handle the clipboard copy event

  • html5/js/Client.js

     
    16411641}
    16421642
    16431643
    1644 XpraClient.prototype.get_clipboard_buffer = function() {
     1644function sleep(duration){
     1645    var now = new Date().getTime();
     1646    while(new Date().getTime() < now + duration) {
     1647        /* do nothing */
     1648    }
     1649}
     1650
     1651XpraClient.prototype.get_clipboard_buffer = async function() {
     1652        this.log("get_clipboard_buffer")
     1653        sleep(150);
    16451654        return this.clipboard_buffer;
    16461655}
    16471656