Commit 86b40ec0 authored by Tony Murray's avatar Tony Murray

Fix black screen on initial connect to a VNC server by drawing the first time.


svn path=/trunk/KDE/kdenetwork/krdc/; revision=1138037
parent 3746de21
......@@ -362,20 +362,20 @@ void VncView::updateImage(int x, int y, int w, int h)
saveWalletPassword(vncThread.password());
}
#endif
} else {
if ((y == 0 && x == 0) && (m_frame.size() != size())) {
kDebug(5011) << "Updating framebuffer size";
if (m_scale) {
setMaximumSize(QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX));
if (parentWidget())
scaleResize(parentWidget()->width(), parentWidget()->height());
} else {
kDebug(5011) << "Resizing: " << m_frame.width() << m_frame.height();
resize(m_frame.width(), m_frame.height());
setMaximumSize(m_frame.width(), m_frame.height()); //This is a hack to force Qt to center the view in the scroll area
setMinimumSize(m_frame.width(), m_frame.height());
emit framebufferSizeChanged(m_frame.width(), m_frame.height());
}
}
if ((y == 0 && x == 0) && (m_frame.size() != size())) {
kDebug(5011) << "Updating framebuffer size";
if (m_scale) {
setMaximumSize(QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX));
if (parentWidget())
scaleResize(parentWidget()->width(), parentWidget()->height());
} else {
kDebug(5011) << "Resizing: " << m_frame.width() << m_frame.height();
resize(m_frame.width(), m_frame.height());
setMaximumSize(m_frame.width(), m_frame.height()); //This is a hack to force Qt to center the view in the scroll area
setMinimumSize(m_frame.width(), m_frame.height());
emit framebufferSizeChanged(m_frame.width(), m_frame.height());
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment