summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/window.cpp7
-rw-r--r--src/gui/widgets/window.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index ba6d982c8..8c1f63e29 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -54,6 +54,7 @@ Window::Window(const std::string &caption, const bool modal,
mDefaultY(0),
mDefaultWidth(0),
mDefaultHeight(0),
+ mLastRedraw(true),
mGrip(nullptr),
mParent(parent),
mLayout(nullptr),
@@ -200,6 +201,7 @@ void Window::draw(gcn::Graphics *graphics)
}
if (mRedraw)
{
+ mLastRedraw = true;
mRedraw = false;
update = true;
mVertexes->clear();
@@ -229,7 +231,10 @@ void Window::draw(gcn::Graphics *graphics)
g->calcTile(mVertexes, mGrip, mGripRect.x, mGripRect.y);
}
-
+ else
+ {
+ mLastRedraw = false;
+ }
g->drawTile(mVertexes);
}
else
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index 7b05c65f6..f8ebcd598 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -433,6 +433,7 @@ class Window : public gcn::Window,
int mDefaultY; /**< Default window Y position */
int mDefaultWidth; /**< Default window width */
int mDefaultHeight; /**< Default window height */
+ bool mLastRedraw;
private:
enum ResizeHandles