mirror of
https://github.com/openstf/stf
synced 2025-10-05 02:29:26 +02:00
Send latest screen size with every update.
This commit is contained in:
parent
797e97e7c7
commit
692c043f6e
2 changed files with 18 additions and 8 deletions
|
@ -90,14 +90,21 @@ module.exports = syrup.serial()
|
|||
}
|
||||
|
||||
var decoded = jpeg.decode(connState.lastFrame)
|
||||
conn.writeFramebufferUpdate([{
|
||||
xPosition: 0
|
||||
, yPosition: 0
|
||||
, width: connState.frameWidth
|
||||
, height: connState.frameHeight
|
||||
, encodingType: VncConnection.ENCODING_RAW
|
||||
, data: decoded.data
|
||||
}])
|
||||
conn.writeFramebufferUpdate([
|
||||
{ xPosition: 0
|
||||
, yPosition: 0
|
||||
, width: decoded.width
|
||||
, height: decoded.height
|
||||
, encodingType: VncConnection.ENCODING_RAW
|
||||
, data: decoded.data
|
||||
}
|
||||
, { xPosition: 0
|
||||
, yPosition: 0
|
||||
, width: decoded.width
|
||||
, height: decoded.height
|
||||
, encodingType: VncConnection.ENCODING_DESKTOPSIZE
|
||||
}
|
||||
])
|
||||
|
||||
connState.updateRequests = 0
|
||||
connState.sentFrameTime = connState.lastFrameTime
|
||||
|
|
|
@ -92,6 +92,7 @@ var StateReverse = Object.create(null), State = {
|
|||
}
|
||||
|
||||
VncConnection.ENCODING_RAW = 0
|
||||
VncConnection.ENCODING_DESKTOPSIZE = -223
|
||||
|
||||
Object.keys(State).map(function(name) {
|
||||
VncConnection[name] = State[name]
|
||||
|
@ -122,6 +123,8 @@ VncConnection.prototype.writeFramebufferUpdate = function(rectangles) {
|
|||
case VncConnection.ENCODING_RAW:
|
||||
this._write(rect.data)
|
||||
break
|
||||
case VncConnection.ENCODING_DESKTOPSIZE:
|
||||
break
|
||||
default:
|
||||
throw new Error(util.format(
|
||||
'Unsupported encoding type', rect.encodingType))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue