Lines 1-6
Link Here
|
1 |
/* |
1 |
/* |
2 |
* noVNC: HTML5 VNC client |
2 |
* noVNC: HTML5 VNC client |
3 |
* Copyright (C) 2012 Joel Martin |
3 |
* Copyright (C) 2012 Joel Martin |
|
|
4 |
* Copyright (C) 2013 Samuel Mannehed for Cendio AB |
4 |
* Licensed under MPL 2.0 (see LICENSE.txt) |
5 |
* Licensed under MPL 2.0 (see LICENSE.txt) |
5 |
* |
6 |
* |
6 |
* See README.md for usage and integration instructions. |
7 |
* See README.md for usage and integration instructions. |
Lines 1594-1626
encHandlers.ext_desktop_size = function () {
Link Here
|
1594 |
//Util.Debug(">> ext_desktop_size"); |
1599 |
//Util.Debug(">> ext_desktop_size"); |
1595 |
if (ws.rQwait("ext_desktop_size", 4)) { return false; } |
1600 |
if (ws.rQwait("ext_desktop_size", 4)) { return false; } |
1596 |
|
1601 |
|
|
|
1602 |
supportsSetDesktopSize = true; |
1603 |
|
1597 |
var number_of_screens = ws.rQshift8(); |
1604 |
var number_of_screens = ws.rQshift8(); |
1598 |
|
1605 |
|
1599 |
ws.rQshift8(); // padding |
1606 |
ws.rQshift8(); // padding |
1600 |
ws.rQshift16(); // padding |
1607 |
ws.rQshift16(); // padding |
1601 |
|
1608 |
|
1602 |
for (var i=0; i<number_of_screens; i += 1) { |
1609 |
for (var i=0; i<number_of_screens; i += 1) { |
1603 |
screen_id = ws.rQshift32(); // id |
1610 |
// Save the id and flags of the first screen |
1604 |
ws.rQshift16(); // x-position |
1611 |
if (i == 0) { |
1605 |
ws.rQshift16(); // y-position |
1612 |
screen_id = ws.rQshift32(); // id |
1606 |
ws.rQshift16(); // width |
1613 |
ws.rQshift16(); // x-position |
1607 |
ws.rQshift16(); // height |
1614 |
ws.rQshift16(); // y-position |
1608 |
screen_flags = ws.rQshift32(); // flags |
1615 |
ws.rQshift16(); // width |
|
|
1616 |
ws.rQshift16(); // height |
1617 |
screen_flags = ws.rQshift32(); // flags |
1618 |
} else { |
1619 |
ws.rQshiftBytes(16); |
1620 |
} |
1609 |
} |
1621 |
} |
1610 |
|
1622 |
|
1611 |
if (FBU.x == 0) { |
1623 |
if (FBU.x == 0 && FBU.y != 0) { return false; } |
1612 |
fb_width = FBU.width; |
|
|
1613 |
fb_height = FBU.height; |
1614 |
conf.onFBResize(that, fb_width, fb_height); |
1615 |
display.resize(fb_width, fb_height); |
1616 |
timing.fbu_rt_start = (new Date()).getTime(); |
1617 |
// Send a new non-incremental request |
1618 |
ws.send(fbUpdateRequests()); |
1619 |
|
1624 |
|
1620 |
if (FBU.y == 0) { |
1625 |
fb_width = FBU.width; |
1621 |
supportsSetDesktopSize = true; |
1626 |
fb_height = FBU.height; |
1622 |
} |
1627 |
conf.onFBResize(that, fb_width, fb_height); |
1623 |
} |
1628 |
display.resize(fb_width, fb_height); |
|
|
1629 |
timing.fbu_rt_start = (new Date()).getTime(); |
1630 |
// Send a new non-incremental request |
1631 |
ws.send(fbUpdateRequests()); |
1624 |
|
1632 |
|
1625 |
FBU.bytes = 0; |
1633 |
FBU.bytes = 0; |
1626 |
FBU.rects -= 1; |
1634 |
FBU.rects -= 1; |