diff options
Diffstat (limited to 'src/ui/util.c')
-rw-r--r-- | src/ui/util.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ui/util.c b/src/ui/util.c index 770071a6..a24b3199 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -181,7 +181,13 @@ static iBool menuHandler_(iWidget *menu, const char *cmd) { | |||
181 | /* Don't reopen self; instead, root will close the menu. */ | 181 | /* Don't reopen self; instead, root will close the menu. */ |
182 | return iFalse; | 182 | return iFalse; |
183 | } | 183 | } |
184 | if (!equal_Command(cmd, "window.resized")) { | 184 | if (equal_Command(cmd, "mouse.clicked") && arg_Command(cmd)) { |
185 | /* Dismiss open menus when clicking outside them. */ | ||
186 | closeMenu_Widget(menu); | ||
187 | return iTrue; | ||
188 | } | ||
189 | if (!equal_Command(cmd, "window.resized") && | ||
190 | !(equal_Command(cmd, "mouse.clicked") && !arg_Command(cmd)) /* ignore button release */) { | ||
185 | closeMenu_Widget(menu); | 191 | closeMenu_Widget(menu); |
186 | } | 192 | } |
187 | } | 193 | } |