Skip to content

Commit

Permalink
'draw' debugging caused paint errors
Browse files Browse the repository at this point in the history
trying to call the 'paint_box' function from the wrong 'this' context, or without having access to Constants.js
  • Loading branch information
totaam committed Nov 12, 2024
1 parent 988b150 commit bbc3fc3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion html5/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
<script type="text/javascript" src="js/Keycodes.js"></script>
<script type="text/javascript" src="js/Protocol.js"></script>
<script type="text/javascript" src="js/WebTransport.js"></script>
<script type="text/javascript" src="js/Constants.js"></script>
<script type="text/javascript" src="js/Window.js"></script>
<script type="text/javascript" src="js/Notifications.js"></script>
<script type="text/javascript" src="js/Constants.js"></script>
<script type="text/javascript" src="js/MediaSourceUtil.js"></script>
<script type="text/javascript" src="js/RgbHelpers.js"></script>
<script type="text/javascript" src="js/VideoDecoder.js"></script>
Expand Down
2 changes: 2 additions & 0 deletions html5/js/PaintWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* Worker for offscreen painting.
*/

importScripts("./Constants.js");

const KEEP_STILLS = false; // Keep a screenshot of each window for repaint. This seems to affect performance.

class XpraPaintWorker {
Expand Down
2 changes: 1 addition & 1 deletion html5/js/Window.js
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ class XpraWindow {
me.paint_pending = 0;
if (!skip_box && me.debug_categories.includes("draw")) {
const color = DEFAULT_BOX_COLORS[coding] || "white";
this.paint_box(color, x, y, width, height);
me.paint_box(color, x, y, width, height);
}
decode_callback();
}
Expand Down

0 comments on commit bbc3fc3

Please sign in to comment.