Browse Source

We can end up with no screens in some cases. Make sure we at least have a

dummy one when that happens.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4947 3789f03b-4d11-0410-bbf8-ca57d06f2519
tags/v1.2.90
Pierre Ossman 12 years ago
parent
commit
72b4adfd2f
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      vncviewer/DesktopWindow.cxx

+ 5
- 0
vncviewer/DesktopWindow.cxx View File

@@ -546,6 +546,11 @@ void DesktopWindow::remoteResize()

layout.add_screen(rfb::Screen(id, sx, sy, sw, sh, 0));
}

// If the viewport doesn't match a physical screen, then we might
// end up with no screens in the layout. Add a fake one...
if (layout.num_screens() == 0)
layout.add_screen(rfb::Screen(0, 0, 0, width, height, 0));
}
#endif


Loading…
Cancel
Save