From 5ea9050ac91402262b84749557be61506c4af5d2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 1 Sep 2011 04:32:32 +0300 Subject: Fix windows max x and y position. was to one pixel less then screen size. --- src/gui/widgets/window.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui/widgets') diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 9cb7cb620..7508d4e4b 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -709,10 +709,10 @@ void Window::loadWindowState() int width = getWidth(); int height = getHeight(); - if (getX() + width >= viewport->getWidth()) - width = viewport->getWidth() - getX() - 1; - if (getY() + height >= viewport->getHeight()) - height = viewport->getHeight() - getY() - 1; + if (getX() + width > viewport->getWidth()) + width = viewport->getWidth() - getX(); + if (getY() + height > viewport->getHeight()) + height = viewport->getHeight() - getY(); if (width < 0) width = 0; if (height < 0) -- cgit v1.2.3-60-g2f50