summaryrefslogtreecommitdiffstats
path: root/vncviewer
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2012-07-20 14:11:26 +0000
committerPierre Ossman <ossman@cendio.se>2012-07-20 14:11:26 +0000
commit72b4adfd2f84fb253b4c19b58a8858e4682c5445 (patch)
treec5b719282dffd874beeed110b6fa1fc7a7875421 /vncviewer
parentf44f6c02db249af0c579dcf5e59cbed2f549e2b7 (diff)
downloadtigervnc-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.cxx5
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