diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-04-22 14:41:49 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-04-22 14:41:56 +0300 |
commit | e0238a46940b5c4d9f92de33cddb312804aa7865 (patch) | |
tree | 2f65d2d34766293572ffa946c55ff2c441555a08 /src/ui/widget.c | |
parent | 661c1952f16203f103574eb481a5e02306aba7e5 (diff) |
Widget: Clicking outside a popup menu
The click is eaten to avoid accidentally clicking anything outside the menu.
Diffstat (limited to 'src/ui/widget.c')
-rw-r--r-- | src/ui/widget.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c index 2048867d..b398b7f6 100644 --- a/src/ui/widget.c +++ b/src/ui/widget.c | |||
@@ -978,6 +978,7 @@ iBool processEvent_Widget(iWidget *d, const SDL_Event *ev) { | |||
978 | ev->button.button, | 978 | ev->button.button, |
979 | ev->button.x, | 979 | ev->button.x, |
980 | ev->button.y); | 980 | ev->button.y); |
981 | return iTrue; | ||
981 | } | 982 | } |
982 | if (d->flags & mouseModal_WidgetFlag && isMouseEvent_(ev)) { | 983 | if (d->flags & mouseModal_WidgetFlag && isMouseEvent_(ev)) { |
983 | if ((ev->type == SDL_MOUSEBUTTONDOWN || ev->type == SDL_MOUSEBUTTONUP) && | 984 | if ((ev->type == SDL_MOUSEBUTTONDOWN || ev->type == SDL_MOUSEBUTTONUP) && |