From 46b730c6e41e13802e129a5e3970a66b6083311e Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 15 Jul 2021 09:47:22 +0300 Subject: Widget: Removed unnecessary assertions --- src/ui/widget.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/ui') diff --git a/src/ui/widget.c b/src/ui/widget.c index 992f115d..4f567989 100644 --- a/src/ui/widget.c +++ b/src/ui/widget.c @@ -903,7 +903,7 @@ void unhover_Widget(void) { } iBool dispatchEvent_Widget(iWidget *d, const SDL_Event *ev) { - iAssert(d->root == get_Root()); + //iAssert(d->root == get_Root()); if (!d->parent) { if (get_Window()->focus && get_Window()->focus->root == d->root && isKeyboardEvent_(ev)) { /* Root dispatches keyboard events directly to the focused widget. */ @@ -954,7 +954,7 @@ iBool dispatchEvent_Widget(iWidget *d, const SDL_Event *ev) { handle the events first. */ iReverseForEach(ObjectList, i, d->children) { iWidget *child = as_Widget(i.object); - iAssert(child->root == d->root); + //iAssert(child->root == d->root); if (child == get_Window()->focus && isKeyboardEvent_(ev)) { continue; /* Already dispatched. */ } @@ -1000,11 +1000,11 @@ iBool dispatchEvent_Widget(iWidget *d, const SDL_Event *ev) { } } if (class_Widget(d)->processEvent(d, ev)) { - iAssert(get_Root() == d->root); + //iAssert(get_Root() == d->root); return iTrue; } } - iAssert(get_Root() == d->root); + //iAssert(get_Root() == d->root); return iFalse; } @@ -1104,7 +1104,6 @@ iBool processEvent_Widget(iWidget *d, const SDL_Event *ev) { setFlags_Widget(d, dragged_WidgetFlag, iFalse); } if (d->commandHandler && d->commandHandler(d, ev->user.data1)) { - iAssert(get_Root() == d->root); return iTrue; } } -- cgit v1.2.3