diff options
author | Pierre Ossman <ossman@cendio.se> | 2012-07-20 14:11:26 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2012-07-20 14:11:26 +0000 |
commit | 72b4adfd2f84fb253b4c19b58a8858e4682c5445 (patch) | |
tree | c5b719282dffd874beeed110b6fa1fc7a7875421 /vncviewer | |
parent | f44f6c02db249af0c579dcf5e59cbed2f549e2b7 (diff) | |
download | tigervnc-72b4adfd2f84fb253b4c19b58a8858e4682c5445.tar.gz tigervnc-72b4adfd2f84fb253b4c19b58a8858e4682c5445.zip |
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
Diffstat (limited to 'vncviewer')
-rw-r--r-- | vncviewer/DesktopWindow.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx index 829d3dbe..0431e04b 100644 --- a/vncviewer/DesktopWindow.cxx +++ b/vncviewer/DesktopWindow.cxx @@ -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 |