Bugzilla – Attachment 479 Details for
Bug 4642
Resize support for the HTML5 Client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fixes some errors in the logic from the first patch
resizesupport_git_v2.patch (text/plain), 3.52 KB, created by
Samuel Mannehed
on 2013-06-25 13:18:43 CEST
(
hide
)
Description:
fixes some errors in the logic from the first patch
Filename:
MIME Type:
Creator:
Samuel Mannehed
Created:
2013-06-25 13:18:43 CEST
Size:
3.52 KB
patch
obsolete
>diff --git a/include/rfb.js b/include/rfb.js >index 6c6bc3f..13bfe1f 100644 >--- a/include/rfb.js >+++ b/include/rfb.js >@@ -1,6 +1,7 @@ > /* > * noVNC: HTML5 VNC client > * Copyright (C) 2012 Joel Martin >+ * Copyright (C) 2013 Samuel Mannehed for Cendio AB > * Licensed under MPL 2.0 (see LICENSE.txt) > * > * See README.md for usage and integration instructions. >@@ -1594,33 +1599,36 @@ encHandlers.ext_desktop_size = function () { > //Util.Debug(">> ext_desktop_size"); > if (ws.rQwait("ext_desktop_size", 4)) { return false; } > >+ supportsSetDesktopSize = true; >+ > var number_of_screens = ws.rQshift8(); > > ws.rQshift8(); // padding > ws.rQshift16(); // padding > > for (var i=0; i<number_of_screens; i += 1) { >- screen_id = ws.rQshift32(); // id >- ws.rQshift16(); // x-position >- ws.rQshift16(); // y-position >- ws.rQshift16(); // width >- ws.rQshift16(); // height >- screen_flags = ws.rQshift32(); // flags >+ // Save the id and flags of the first screen >+ if (i == 0) { >+ screen_id = ws.rQshift32(); // id >+ ws.rQshift16(); // x-position >+ ws.rQshift16(); // y-position >+ ws.rQshift16(); // width >+ ws.rQshift16(); // height >+ screen_flags = ws.rQshift32(); // flags >+ } else { >+ ws.rQshiftBytes(16); >+ } > } > >- if (FBU.x == 0) { >- fb_width = FBU.width; >- fb_height = FBU.height; >- conf.onFBResize(that, fb_width, fb_height); >- display.resize(fb_width, fb_height); >- timing.fbu_rt_start = (new Date()).getTime(); >- // Send a new non-incremental request >- ws.send(fbUpdateRequests()); >+ if (FBU.x == 0 && FBU.y != 0) { return false; } > >- if (FBU.y == 0) { >- supportsSetDesktopSize = true; >- } >- } >+ fb_width = FBU.width; >+ fb_height = FBU.height; >+ conf.onFBResize(that, fb_width, fb_height); >+ display.resize(fb_width, fb_height); >+ timing.fbu_rt_start = (new Date()).getTime(); >+ // Send a new non-incremental request >+ ws.send(fbUpdateRequests()); > > FBU.bytes = 0; > FBU.rects -= 1; >diff --git a/include/ui.js b/include/ui.js >index 4c06fce..72e65c7 100644 >--- a/include/ui.js >+++ b/include/ui.js >@@ -1,6 +1,7 @@ > /* > * noVNC: HTML5 VNC client > * Copyright (C) 2012 Joel Martin >+ * Copyright (C) 2013 Samuel Mannehed for Cendio AB > * Licensed under MPL 2.0 (see LICENSE.txt) > * > * See README.md for usage and integration instructions. >@@ -39,10 +40,10 @@ load: function (callback) { > onresize: function (callback) { > clearTimeout(resizeTimeout); > resizeTimeout = setTimeout(function(){ >- // Control-bar height: 44px + >- // Status-bar height: 24px + >- // border height: 5px = 73px to be deducted from the height >- UI.rfb.setDesktopSize(window.innerWidth, window.innerHeight - 73); >+ // Control-bar height: 44px + >+ // Status-bar height: 24px + >+ // border height: 5px = 73px to be deducted from the height >+ UI.rfb.setDesktopSize(window.innerWidth, window.innerHeight - 73); > }, 500); > }, > >@@ -465,7 +468,7 @@ updateState: function(rfb, state, oldstate, msg) { > // When reconnecting to an existing session, > // make sure the resolution is updated to the window size > if (oldstate === 'ServerInitialisation') { >- onresize(); >+ onresize(); > } > klass = "noVNC_status_normal"; > break;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 4642
:
478
| 479