diff options
author | rubidium <rubidium@openttd.org> | 2009-10-10 12:11:05 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-10-10 12:11:05 +0000 |
commit | 66721ffd3657c4daa09693b71e8205bd24c1200a (patch) | |
tree | fc54b1c29df2d47d15c029ad4677f4c35195fb26 /src | |
parent | ef8a3d6d943b04dd8a4b545d0b64c8b1c0e44113 (diff) | |
download | openttd-66721ffd3657c4daa09693b71e8205bd24c1200a.tar.xz |
(svn r17751) -Fix [FS#3253]: sometimes clicking on a for the user unfocused edit box would show the OSK (Zuu)
Diffstat (limited to 'src')
-rw-r--r-- | src/window.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/window.cpp b/src/window.cpp index 9da50f6b2..71a776464 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -360,7 +360,16 @@ static void DispatchLeftClickEvent(Window *w, int x, int y, bool double_click) 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) { |