summaryrefslogtreecommitdiff
path: root/src/gui/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r--src/gui/window.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index f6f5f4b8..d1ada53d 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -257,17 +257,16 @@ void Window::setResizable(bool r)
void Window::widgetResized(const gcn::Event &event)
{
+ const gcn::Rectangle area = getChildrenArea();
+
if (mGrip)
- {
- const gcn::Rectangle area = getChildrenArea();
mGrip->setPosition(getWidth() - mGrip->getWidth() - area.x,
getHeight() - mGrip->getHeight() - area.y);
- }
if (mLayout)
{
- int w = getWidth() - 2 * getPadding();
- int h = getHeight() - getPadding() - getTitleBarHeight();
+ int w = area.width;
+ int h = area.height;
mLayout->reflow(w, h);
}
}