From 690ee5fa678537f03dfe1aaa78a17690a9991f15 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 13 Sep 2009 20:03:04 +0000 Subject: Commit salty-horse's fix for bug #2854261 "GUI: Launcher list doesn't highlight after getting focus". svn-id: r44067 --- gui/ListWidget.cpp | 7 ++++++- gui/ListWidget.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp index 195256b66f..b71bb4701e 100644 --- a/gui/ListWidget.cpp +++ b/gui/ListWidget.cpp @@ -404,8 +404,13 @@ bool ListWidget::handleKeyUp(Common::KeyState state) { return true; } +void ListWidget::receivedFocusWidget() { + // Redraw the widget so the selection color will change + draw(); +} + void ListWidget::lostFocusWidget() { - // If we loose focus, we simply forget the user changes + // If we lose focus, we simply forget the user changes _editMode = false; g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false); drawCaret(true); diff --git a/gui/ListWidget.h b/gui/ListWidget.h index 23c12a38fc..721dae051d 100644 --- a/gui/ListWidget.h +++ b/gui/ListWidget.h @@ -145,6 +145,7 @@ protected: Common::Rect getEditRect() const; + void receivedFocusWidget(); void lostFocusWidget(); void scrollToCurrent(); -- cgit v1.2.3