View | Details | Raw Unified | Return to bug 4642
Collapse All | Expand All

(-)a/include/rfb.js (-18 / +22 lines)
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;
(-)a/include/ui.js (-5 / +6 lines)
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 39-48 load: function (callback) { Link Here
39
onresize: function (callback) {
40
onresize: function (callback) {
40
    clearTimeout(resizeTimeout);
41
    clearTimeout(resizeTimeout);
41
    resizeTimeout = setTimeout(function(){
42
    resizeTimeout = setTimeout(function(){
42
	// Control-bar height: 44px +
43
        // Control-bar height: 44px +
43
	// Status-bar height: 24px + 
44
        // Status-bar height: 24px + 
44
	// border height: 5px = 73px to be deducted from the height
45
        // border height: 5px = 73px to be deducted from the height
45
	UI.rfb.setDesktopSize(window.innerWidth, window.innerHeight - 73);
46
        UI.rfb.setDesktopSize(window.innerWidth, window.innerHeight - 73);
46
    }, 500);
47
    }, 500);
47
},
48
},
48
49
Lines 465-471 updateState: function(rfb, state, oldstate, msg) { Link Here
465
            // When reconnecting to an existing session, 
468
            // When reconnecting to an existing session, 
466
            // make sure the resolution is updated to the window size
469
            // make sure the resolution is updated to the window size
467
            if (oldstate === 'ServerInitialisation') {
470
            if (oldstate === 'ServerInitialisation') {
468
        	onresize();
471
                onresize();
469
            }
472
            }
470
            klass = "noVNC_status_normal";
473
            klass = "noVNC_status_normal";
471
            break;
474
            break;

Return to bug 4642