diff options
Diffstat (limited to 'core/rfb.js')
-rw-r--r-- | core/rfb.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/rfb.js b/core/rfb.js index 0276f16..a52c00d 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -547,7 +547,8 @@ export default class RFB extends EventTargetMixin { } const size = this._screenSize(); - RFB.messages.setDesktopSize(this._sock, size.w, size.h, + RFB.messages.setDesktopSize(this._sock, + Math.floor(size.w), Math.floor(size.h), this._screen_id, this._screen_flags); Log.Debug('Requested new desktop size: ' + @@ -556,8 +557,8 @@ export default class RFB extends EventTargetMixin { // Gets the the size of the available screen _screenSize() { - return { w: this._screen.offsetWidth, - h: this._screen.offsetHeight }; + let r = this._screen.getBoundingClientRect(); + return { w: r.width, h: r.height }; } _fixScrollbars() { |