summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-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)