diff options
Diffstat (limited to 'src/window.cpp')
-rw-r--r-- | src/window.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/window.cpp b/src/window.cpp index 50d93117a..f5fed776d 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -22,6 +22,7 @@ #include "tilehighlight_func.h" #include "network/network.h" #include "querystring_gui.h" +#include "widgets/dropdown_func.h" #include "table/sprites.h" @@ -188,6 +189,10 @@ static void DispatchLeftClickEvent(Window *w, int x, int y, bool double_click) } } + /* Close any child drop down menus. If the button pressed was the drop down + * list's own button, then we should not process the click any further. */ + if (HideDropDownMenu(w) == widget) return; + if (w->desc_flags & WDF_STD_BTN) { if (widget == 0) { /* 'X' */ delete w; |