diff --git a/src/gui/components/cc_frm_window.cpp b/src/gui/components/cc_frm_window.cpp index 869acd530..e808e28b1 100644 --- a/src/gui/components/cc_frm_window.cpp +++ b/src/gui/components/cc_frm_window.cpp @@ -170,8 +170,13 @@ void CComponentsWindow::initWindowSize() if (width == 0) width = frameBuffer->getScreenWidth(); + else if ((unsigned)width > frameBuffer->getScreenWidth()) + width = frameBuffer->getScreenWidth(); + if (height == 0) height = frameBuffer->getScreenHeight(); + else if((unsigned)height > frameBuffer->getScreenHeight()) + height = frameBuffer->getScreenHeight(); } void CComponentsWindow::initWindowPos()