summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/widgets/dropdown.cpp6
-rw-r--r--src/gui/widgets/dropdown.h4
2 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index c45dc226..8b36f19f 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -234,6 +234,12 @@ void DropDown::keyPressed(gcn::KeyEvent& keyEvent)
}
}
+void DropDown::focusLost(const gcn::Event& event)
+{
+ gcn::DropDown::focusLost(event);
+ releaseModalMouseInputFocus();
+}
+
void DropDown::mouseWheelMovedUp(gcn::MouseEvent& mouseEvent)
{
setSelected(getSelected() - 1);
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h
index 568e20a5..15c52767 100644
--- a/src/gui/widgets/dropdown.h
+++ b/src/gui/widgets/dropdown.h
@@ -58,6 +58,10 @@ class DropDown : public gcn::DropDown
void drawFrame(gcn::Graphics *graphics);
+ // Inherited from FocusListener
+
+ void focusLost(const gcn::Event& event);
+
// Inherited from KeyListener
void keyPressed(gcn::KeyEvent& keyEvent);