diff options
Diffstat (limited to 'src/ui/widget.c')
-rw-r--r-- | src/ui/widget.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c index d3f28b08..05bb62cc 100644 --- a/src/ui/widget.c +++ b/src/ui/widget.c | |||
@@ -542,6 +542,15 @@ iBool processEvent_Widget(iWidget *d, const SDL_Event *ev) { | |||
542 | break; | 542 | break; |
543 | } | 543 | } |
544 | } | 544 | } |
545 | if (d->flags & commandOnMouseMiss_WidgetFlag && ev->type == SDL_MOUSEBUTTONDOWN && | ||
546 | !contains_Widget(d, init_I2(ev->button.x, ev->button.y))) { | ||
547 | postCommand_Widget(d, | ||
548 | "mouse.missed arg:%d button:%d coord:%d %d", | ||
549 | ev->type == SDL_MOUSEBUTTONDOWN ? 1 : 0, | ||
550 | ev->button.button, | ||
551 | ev->button.x, | ||
552 | ev->button.y); | ||
553 | } | ||
545 | if (d->flags & mouseModal_WidgetFlag && isMouseEvent_(ev)) { | 554 | if (d->flags & mouseModal_WidgetFlag && isMouseEvent_(ev)) { |
546 | setCursor_Window(get_Window(), SDL_SYSTEM_CURSOR_ARROW); | 555 | setCursor_Window(get_Window(), SDL_SYSTEM_CURSOR_ARROW); |
547 | return iTrue; | 556 | return iTrue; |