From e894bf7f1120bb3f48d43bca121dd80de623f0db Mon Sep 17 00:00:00 2001 From: samhed Date: Tue, 12 Nov 2013 15:32:50 +0100 Subject: [PATCH] TESTING, TO BE REMOVED --- include/display.js | 2 ++ include/rfb.js | 6 ++++-- include/ui.js | 9 ++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/include/display.js b/include/display.js index d15c99e5..e4469c3b 100644 --- a/include/display.js +++ b/include/display.js @@ -396,6 +396,7 @@ that.absY = function(y) { that.resize = function(width, height) { + console.log("resize"); c_prevStyle = ""; fb_width = width; @@ -403,6 +404,7 @@ that.resize = function(width, height) { rescale(conf.scale); that.viewportChange(0, 0, width, height); + //that.viewportChange(); }; that.clear = function() { diff --git a/include/rfb.js b/include/rfb.js index 3726dab9..039f5586 100644 --- a/include/rfb.js +++ b/include/rfb.js @@ -64,8 +64,8 @@ var that = {}, // Public API methods //['JPEG_quality_hi', -23 ], //['compress_lo', -255 ], ['compress_hi', -247 ], - ['last_rect', -224 ], - ['ext_desktop_size', -308 ] + ['last_rect', -224 ] + //['ext_desktop_size', -308 ] ], encHandlers = {}, @@ -1627,6 +1627,7 @@ encHandlers.ext_desktop_size = function () { fb_width = FBU.width; fb_height = FBU.height; conf.onFBResize(that, fb_width, fb_height); + console.log("extended"); display.resize(fb_width, fb_height); FBU.bytes = 0; @@ -1640,6 +1641,7 @@ encHandlers.DesktopSize = function set_desktopsize() { fb_width = FBU.width; fb_height = FBU.height; conf.onFBResize(that, fb_width, fb_height); + console.log("desktop"); display.resize(fb_width, fb_height); timing.fbu_rt_start = (new Date()).getTime(); // Send a new non-incremental request diff --git a/include/ui.js b/include/ui.js index 02f545ef..601c4fa1 100644 --- a/include/ui.js +++ b/include/ui.js @@ -47,7 +47,7 @@ load: function (callback) { onresize: function (callback) { // Control-bar height: 36px + // border height: 5px = 41px to be deducted from the height - UI.rfb.setDesktopSize(window.innerWidth, window.innerHeight - 41); + //UI.rfb.setDesktopSize(window.innerWidth, window.innerHeight - 41); }, // Render default UI and initialize settings menu @@ -298,6 +298,10 @@ forceSetting: function(name, val) { // Show the popup status panel togglePopupStatusPanel: function() { + + + console.log("clip: " + UI.getSetting('clip')); + console.log("cur_clip: " + UI.rfb.get_display().get_viewport()); var psp = $D('noVNC_popup_status_panel'); if (UI.popupStatusOpen === true) { psp.style.display = "none"; @@ -697,6 +701,9 @@ setViewClip: function(clip) { clip = UI.getSetting('clip'); } + console.log("clip: " + clip); + console.log("cur_clip: " + cur_clip); + if (clip && !cur_clip) { // Turn clipping on UI.updateSetting('clip', true);