mirror of
https://github.com/fcwu/docker-ubuntu-vnc-desktop
synced 2026-08-05 16:12:41 +02:00
Revert "Toolbar with scale and quality."
This commit is contained in:
+23
-47
@@ -35,6 +35,28 @@ var RFB;
|
||||
this._rfb_tightvnc = false;
|
||||
this._rfb_xvp_ver = 0;
|
||||
|
||||
// In preference order
|
||||
this._encodings = [
|
||||
['COPYRECT', 0x01 ],
|
||||
['TIGHT', 0x07 ],
|
||||
['TIGHT_PNG', -260 ],
|
||||
['HEXTILE', 0x05 ],
|
||||
['RRE', 0x02 ],
|
||||
['RAW', 0x00 ],
|
||||
['DesktopSize', -223 ],
|
||||
['Cursor', -239 ],
|
||||
|
||||
// Psuedo-encoding settings
|
||||
//['JPEG_quality_lo', -32 ],
|
||||
['JPEG_quality_med', -26 ],
|
||||
//['JPEG_quality_hi', -23 ],
|
||||
//['compress_lo', -255 ],
|
||||
['compress_hi', -247 ],
|
||||
['last_rect', -224 ],
|
||||
['xvp', -309 ],
|
||||
['ExtendedDesktopSize', -308 ]
|
||||
];
|
||||
|
||||
this._encHandlers = {};
|
||||
this._encNames = {};
|
||||
this._encStats = {};
|
||||
@@ -109,6 +131,7 @@ var RFB;
|
||||
'wsProtocols': ['binary', 'base64'], // Protocols to use in the WebSocket connection
|
||||
'repeaterID': '', // [UltraVNC] RepeaterID to connect to
|
||||
'viewportDrag': false, // Move the viewport on mouse drags
|
||||
|
||||
// Callback functions
|
||||
'onUpdateState': function () { }, // onUpdateState(rfb, state, oldstate, statusMsg): state update/change
|
||||
'onPasswordRequired': function () { }, // onPasswordRequired(rfb): VNC password is required
|
||||
@@ -121,53 +144,6 @@ var RFB;
|
||||
'onXvpInit': function () { }, // onXvpInit(version): XVP extensions active for this connection
|
||||
});
|
||||
|
||||
try{
|
||||
// Use my custom 'jpeg_quality'.
|
||||
this._encodings = [
|
||||
// ['COPYRECT', 0x01 ],
|
||||
['TIGHT', 0x07 ],
|
||||
['TIGHT_PNG', -260 ],
|
||||
['HEXTILE', 0x05 ],
|
||||
['RRE', 0x02 ],
|
||||
['RAW', 0x00 ],
|
||||
['DesktopSize', -223 ],
|
||||
['Cursor', -239 ],
|
||||
|
||||
// Psuedo-encoding settings
|
||||
['JPEG_quality_lo', -32 + jpeg_quality ],
|
||||
// ['JPEG_quality_med', -28 ],
|
||||
// ['JPEG_quality_hi', -23 ],
|
||||
// ['compress_lo', -255 ],
|
||||
['compress_hi', -247 ],
|
||||
['last_rect', -224 ],
|
||||
['xvp', -309 ],
|
||||
['ExtendedDesktopSize', -308 ]
|
||||
];
|
||||
}
|
||||
catch(e){
|
||||
// If my custom 'jpeg_quality' is not defined, just use default setting.
|
||||
this._encodings = [
|
||||
['COPYRECT', 0x01 ],
|
||||
['TIGHT', 0x07 ],
|
||||
['TIGHT_PNG', -260 ],
|
||||
['HEXTILE', 0x05 ],
|
||||
['RRE', 0x02 ],
|
||||
['RAW', 0x00 ],
|
||||
['DesktopSize', -223 ],
|
||||
['Cursor', -239 ],
|
||||
|
||||
// Psuedo-encoding settings
|
||||
//['JPEG_quality_lo', -32 ],
|
||||
['JPEG_quality_med', -26 ],
|
||||
//['JPEG_quality_hi', -23 ],
|
||||
//['compress_lo', -255 ],
|
||||
['compress_hi', -247 ],
|
||||
['last_rect', -224 ],
|
||||
['xvp', -309 ],
|
||||
['ExtendedDesktopSize', -308 ]
|
||||
];
|
||||
}
|
||||
|
||||
// main setup
|
||||
Util.Debug(">> RFB.constructor");
|
||||
|
||||
|
||||
+1
-10
@@ -468,16 +468,7 @@ Util.getEventPosition = function (e, obj, scale) {
|
||||
var realy = docY - pos.y;
|
||||
var x = Math.max(Math.min(realx, pos.width - 1), 0);
|
||||
var y = Math.max(Math.min(realy, pos.height - 1), 0);
|
||||
|
||||
try{
|
||||
// Use my custom 'Scale' rate.
|
||||
return {'x': x / Scale.x, 'y': y / Scale.y, 'realx': realx / Scale.x, 'realy': realy / Scale.y};
|
||||
}
|
||||
catch(e){
|
||||
// If my custom 'Scale' is not defined, just use default 'scale'.
|
||||
return {'x': x / scale, 'y': y / scale, 'realx': realx / scale, 'realy': realy / scale};
|
||||
}
|
||||
|
||||
return {'x': x / scale, 'y': y / scale, 'realx': realx / scale, 'realy': realy / scale};
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user