Skip to content

Commit 5608f69

Browse files
author
TijZwa
committed
Fix #217
1 parent 18791c1 commit 5608f69

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

html5/js/OffscreenDecodeWorker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ class WindowDecoder {
181181
w: packet[4],
182182
h: packet[5],
183183
},
184-
[packet[7]]
184+
// Scroll does not hold a transferable type
185+
coding == "scroll" ? [] : [packet[7]]
185186
);
186187
}
187188
}

html5/js/PaintWorker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class XpraPaintWorker {
7070
context.drawImage(image, x, y, width, height);
7171
this.paint_box(coding, context, x, y, width, height);
7272
} else if (coding == "scroll") {
73+
let canvas = this.offscreen_canvas.get(wid);
7374
context.imageSmoothingEnabled = false;
7475
for (let index = 0, stop = image.length; index < stop; ++index) {
7576
const scroll_data = image[index];
@@ -80,7 +81,7 @@ class XpraPaintWorker {
8081
const xdelta = scroll_data[4];
8182
const ydelta = scroll_data[5];
8283
context.drawImage(
83-
this.canvas,
84+
canvas,
8485
sx,
8586
sy,
8687
sw,

0 commit comments

Comments
 (0)