summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-01-25 22:16:08 +0000
committerrubidium <rubidium@openttd.org>2009-01-25 22:16:08 +0000
commit7668633f9262315be8191202d03b47600ae19437 (patch)
tree9a42dbc05a5bb06d3aa14110fd1c24288ef80bb6
parent280fb99f62a2ef7aff4fc83b885e8575a9bfa088 (diff)
downloadopenttd-7668633f9262315be8191202d03b47600ae19437.tar.xz
(svn r15273) -Fix: OSK of the chat did not update the caret graphics
-rw-r--r--src/misc_gui.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index bc588a447..99f9cf043 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -1004,7 +1004,15 @@ HandleEditBoxResult QueryString::HandleEditBoxKey(Window *w, int wid, uint16 key
void QueryString::HandleEditBox(Window *w, int wid)
{
- if (HandleCaret(&this->text)) w->InvalidateWidget(wid);
+ if (HandleCaret(&this->text)) {
+ w->InvalidateWidget(wid);
+ /* When we're not the OSK, notify 'our' OSK to redraw the widget,
+ * so the caret changes appropriately. */
+ if (w->window_class != WC_OSK) {
+ Window *w_osk = FindWindowById(WC_OSK, 0);
+ if (w_osk != NULL && w_osk->parent == w) w_osk->OnInvalidateData();
+ }
+ }
}
void QueryString::DrawEditBox(Window *w, int wid)