Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* scrolling for the html5 client
* add missing copyright headers

git-svn-id: https://xpra.org/svn/Xpra/trunk@14387 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Nov 3, 2016
1 parent 081361f commit c820efc
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/html5/js/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function XpraClient(container) {
// some client stuff
this.capabilities = {};
this.RGB_FORMATS = ["RGBX", "RGBA"];
this.supported_encodings = ["jpeg", "png", "rgb", "rgb32"];
this.supported_encodings = ["jpeg", "png", "rgb", "rgb32"]; //, "h264"];
this.enabled_encodings = [];
this.normal_fullscreen_mode = false;
this.start_new_session = null;
Expand Down Expand Up @@ -617,6 +617,7 @@ XpraClient.prototype._make_hello = function() {
"encoding.transparency" : true,
"encoding.client_options" : true,
"encoding.csc_atoms" : true,
"encoding.scrolling" : true,
//video stuff we may handle later:
"encoding.video_reinit" : false,
"encoding.video_scaling" : false,
Expand Down
9 changes: 9 additions & 0 deletions src/html5/js/Notifications.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* This file is part of Xpra.
* Copyright (C) 2016 Antoine Martin <antoine@devloop.org.uk>
* Copyright (c) 2016 Spikes, Inc.
* Licensed under MPL 2.0, see:
* http://www.mozilla.org/MPL/2.0/
*
*/

$(function() {

window.doNotification = function(type, nid, title, message, timeout, onTimeOut){
Expand Down
9 changes: 9 additions & 0 deletions src/html5/js/Utilities.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* This file is part of Xpra.
* Copyright (C) 2016 Antoine Martin <antoine@devloop.org.uk>
* Copyright (c) 2016 Spikes, Inc.
* Licensed under MPL 2.0, see:
* http://www.mozilla.org/MPL/2.0/
*
*/

'use strict';

var Utilities = {
Expand Down
15 changes: 15 additions & 0 deletions src/html5/js/Window.js
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,21 @@ XpraWindow.prototype.paint = function paint(x, y, width, height, coding, img_dat
decode_callback(this.client);
//this._h264_process_raw(img_data);
}
else if (coding=="scroll") {
if(this.offscreen_canvas_mode!='2d') {
this._init_2d_canvas();
}
for(var i=0,j=img_data.length;i<j;++i) {
var scroll_data = img_data[i];
var sx = scroll_data[0],
sy = scroll_data[1],
sw = scroll_data[2],
sh = scroll_data[3],
xdelta = scroll_data[4],
ydelta = scroll_data[5];
this.offscreen_canvas_ctx.drawImage(this.offscreen_canvas, sx, sy, sw, sh, sx+xdelta, y+ydelta, sw, sh);
}
}
else {
throw "unsupported coding " + coding;
}
Expand Down

0 comments on commit c820efc

Please sign in to comment.