Lines 63-69
Link Here
|
63 |
//['JPEG_quality_hi', -23 ], |
63 |
//['JPEG_quality_hi', -23 ], |
64 |
//['compress_lo', -255 ], |
64 |
//['compress_lo', -255 ], |
65 |
['compress_hi', -247 ], |
65 |
['compress_hi', -247 ], |
66 |
['last_rect', -224 ] |
66 |
['last_rect', -224 ], |
|
|
67 |
['ext_desktop_size', -308 ] |
67 |
], |
68 |
], |
68 |
|
69 |
|
69 |
encHandlers = {}, |
70 |
encHandlers = {}, |
Lines 120-125
Link Here
|
120 |
|
121 |
|
121 |
test_mode = false, |
122 |
test_mode = false, |
122 |
|
123 |
|
|
|
124 |
supportsSetDesktopSize = false, |
125 |
screen_id = 0, |
126 |
screen_flags = 0, |
127 |
|
123 |
def_con_timeout = Websock_native ? 2 : 5, |
128 |
def_con_timeout = Websock_native ? 2 : 5, |
124 |
|
129 |
|
125 |
/* Mouse state */ |
130 |
/* Mouse state */ |
Lines 1589-1594
Link Here
|
1589 |
return true; |
1594 |
return true; |
1590 |
}; |
1595 |
}; |
1591 |
|
1596 |
|
|
|
1597 |
encHandlers.ext_desktop_size = function () { |
1598 |
//Util.Debug(">> ext_desktop_size"); |
1599 |
if (ws.rQwait("ext_desktop_size", 4)) { return false; } |
1600 |
|
1601 |
var number_of_screens = ws.rQshift8(); |
1602 |
|
1603 |
ws.rQshift8(); // padding |
1604 |
ws.rQshift16(); // padding |
1605 |
|
1606 |
for (var i=0; i<number_of_screens; i += 1) { |
1607 |
screen_id = ws.rQshift32(); // id |
1608 |
ws.rQshift16(); // x-position |
1609 |
ws.rQshift16(); // y-position |
1610 |
ws.rQshift16(); // width |
1611 |
ws.rQshift16(); // height |
1612 |
screen_flags = ws.rQshift32(); // flags |
1613 |
} |
1614 |
|
1615 |
if (FBU.x == 0) { |
1616 |
fb_width = FBU.width; |
1617 |
fb_height = FBU.height; |
1618 |
conf.onFBResize(that, fb_width, fb_height); |
1619 |
display.resize(fb_width, fb_height); |
1620 |
timing.fbu_rt_start = (new Date()).getTime(); |
1621 |
// Send a new non-incremental request |
1622 |
ws.send(fbUpdateRequests()); |
1623 |
|
1624 |
if (FBU.y == 0) { |
1625 |
supportsSetDesktopSize = true; |
1626 |
} |
1627 |
} |
1628 |
|
1629 |
FBU.bytes = 0; |
1630 |
FBU.rects -= 1; |
1631 |
|
1632 |
//Util.Debug("<< ext_desktop_size"); |
1633 |
return true; |
1634 |
}; |
1635 |
|
1592 |
encHandlers.DesktopSize = function set_desktopsize() { |
1636 |
encHandlers.DesktopSize = function set_desktopsize() { |
1593 |
Util.Debug(">> set_desktopsize"); |
1637 |
Util.Debug(">> set_desktopsize"); |
1594 |
fb_width = FBU.width; |
1638 |
fb_width = FBU.width; |
Lines 1851-1856
Link Here
|
1851 |
//Util.Debug("<< clipboardPasteFrom"); |
1895 |
//Util.Debug("<< clipboardPasteFrom"); |
1852 |
}; |
1896 |
}; |
1853 |
|
1897 |
|
|
|
1898 |
that.setDesktopSize = function(width, height) { |
1899 |
if (rfb_state !== "normal") { return; } |
1900 |
|
1901 |
if (supportsSetDesktopSize) { |
1902 |
|
1903 |
var arr = [251]; // msg-type |
1904 |
arr.push8(0); // padding |
1905 |
arr.push16(width); // width |
1906 |
arr.push16(height); // height |
1907 |
|
1908 |
arr.push8(1); // number-of-screens |
1909 |
arr.push8(0); // padding |
1910 |
|
1911 |
// screen array |
1912 |
arr.push32(screen_id); // id |
1913 |
arr.push16(0); // x-position |
1914 |
arr.push16(0); // y-position |
1915 |
arr.push16(width); // width |
1916 |
arr.push16(height); // height |
1917 |
arr.push32(screen_flags); // flags |
1918 |
|
1919 |
ws.send(arr); |
1920 |
} |
1921 |
}; |
1922 |
|
1854 |
// Override internal functions for testing |
1923 |
// Override internal functions for testing |
1855 |
that.testMode = function(override_send, data_mode) { |
1924 |
that.testMode = function(override_send, data_mode) { |
1856 |
test_mode = true; |
1925 |
test_mode = true; |