summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-04-02 21:30:01 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-04-02 21:30:01 +0000
commitd98bd419b419be1d5069c0fe77fa2a7b6379e45f (patch)
tree95a443b753c6657a0237837aa5d76eebb4a2f835 /src/gui
parent43d51d4a7c00bb425d004acf7eeb5e4aa4e969b0 (diff)
downloadMana-d98bd419b419be1d5069c0fe77fa2a7b6379e45f.tar.gz
Mana-d98bd419b419be1d5069c0fe77fa2a7b6379e45f.tar.bz2
Mana-d98bd419b419be1d5069c0fe77fa2a7b6379e45f.tar.xz
Mana-d98bd419b419be1d5069c0fe77fa2a7b6379e45f.zip
Work around Guichan focussing bug.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui.cpp9
-rw-r--r--src/gui/gui.h5
2 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 899ae374..943584ce 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -80,6 +80,15 @@ Gui::~Gui()
delete guiInput;
}
+void Gui::logic()
+{
+ gcn::Gui::logic();
+
+ // Work around Guichan bug of only applying focus on mouse or keyboard
+ // events.
+ mFocusHandler->applyChanges();
+}
+
void Gui::draw()
{
guiGraphics->pushClipArea(guiTop->getDimension());
diff --git a/src/gui/gui.h b/src/gui/gui.h
index 5051b788..66f7cb0f 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -52,6 +52,11 @@ class Gui : public gcn::Gui, public gcn::MouseListener
~Gui();
/**
+ * Works around Guichan bug
+ */
+ void logic();
+
+ /**
* Draws the whole Gui by calling draw functions down in the
* Gui hierarchy. It also draws the mouse pointer.
*/