Mercurial > hg > openttd
changeset 13242:34d1c05e72ff draft
(svn r17751) -Fix [FS#3253]: sometimes clicking on a for the user unfocused edit box would show the OSK (Zuu)
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sat, 10 Oct 2009 12:11:05 +0000 |
parents | d2c79a7bd44f |
children | ee090d3956ab |
files | src/window.cpp |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/window.cpp +++ b/src/window.cpp @@ -360,7 +360,16 @@ DeleteWindowById(WC_OSK, 0); } - focused_widget_changed = w->SetFocusedWidget(widget_index); + /* focused_widget_changed is 'now' only true if the window this widget + * is in gained focus. In that case it must remain true, also if the + * local widget focus did not change. As such it's the logical-or of + * both changed states. + * + * If this is not preserved, then the OSK window would be opened when + * a user has the edit box focused and then click on another window and + * then back again on the edit box (to type some text). + */ + focused_widget_changed |= w->SetFocusedWidget(widget_index); } if (widget_type & WWB_PUSHBUTTON) {