summaryrefslogtreecommitdiff
path: root/src/gui/widgets/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/window.cpp')
-rw-r--r--src/gui/widgets/window.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 72530db8f..df8599b95 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -131,10 +131,12 @@ void Window::draw(gcn::Graphics *graphics)
return;
Graphics *g = static_cast<Graphics*>(graphics);
+ bool update = false;
if (mRedraw)
{
mRedraw = false;
+ update = true;
g->calcWindow(mVertexes, 0, 0, getWidth(),
getHeight(), mSkin->getBorder());
}
@@ -176,7 +178,16 @@ void Window::draw(gcn::Graphics *graphics)
}
}
- drawChildren(graphics);
+ if (update)
+ {
+ g->setRedraw(update);
+ drawChildren(graphics);
+ g->setRedraw(false);
+ }
+ else
+ {
+ drawChildren(graphics);
+ }
}
void Window::setContentSize(int width, int height)