From 912017621ba3c0a753514fd6c69ea1f3377e8af5 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sat, 20 Aug 2016 16:20:16 +0200 Subject: [PATCH] src/gui/components/cc_frm_window.cpp dont paint over screen size --- src/gui/components/cc_frm_window.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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()