Menu

#1484 Viewer: black bars or scroll bar around windows with odd resolutions

open
nobody
None
5
2019-09-18
2019-09-18
nn ds
No

If the remote desktop resolution is not divisible by 4, then the TightVNC viewer will not allow an exactly sized client window: either scroll bars or black surrounding bars will always be shown.

Reproduce:

  • Start vncserver, desktop sized to 1001x1001
  • Connect with vncviewer, then attempt to resize viewer window to exactly match hosted viewport.
  • Observe scroll bars appearing before surrounding black space has been eliminated

Possible Cause:
DesktopWindow.cpp: void DesktopWindow::setNewFramebuffer function has the following code:

  // the width and height should be aligned to 4
  int alignWidth = (dimension.width + 3) / 4;
  dimension.width = alignWidth * 4;
  int alignHeight = (dimension.height + 3) / 4;
  dimension.height = alignHeight * 4;

This code does not appear to be needed: removing it does not cause any issues that I can tell but does fix the problem of not allowing exact sizing.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB