summaryrefslogtreecommitdiff
path: root/src/gui/widgets/window.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-09-01 04:32:32 +0300
committerAndrei Karas <akaras@inbox.ru>2011-09-01 04:32:32 +0300
commit5ea9050ac91402262b84749557be61506c4af5d2 (patch)
tree8c894e2d03d6dcdda7b1ceee1b171891d6335718 /src/gui/widgets/window.cpp
parent8c68f106f93214d8d645104aa9dba43c6ab082a8 (diff)
downloadplus-5ea9050ac91402262b84749557be61506c4af5d2.tar.gz
plus-5ea9050ac91402262b84749557be61506c4af5d2.tar.bz2
plus-5ea9050ac91402262b84749557be61506c4af5d2.tar.xz
plus-5ea9050ac91402262b84749557be61506c4af5d2.zip
Fix windows max x and y position.
was to one pixel less then screen size.
Diffstat (limited to 'src/gui/widgets/window.cpp')
-rw-r--r--src/gui/widgets/window.cpp8
1 files changed, 4 insertions, 4 deletions
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)