From 22bb32eecf58a5317f6bad2958923fa1172f61e0 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 04 Aug 2021 21:16:46 -0400 Subject: tk: Fix container event passing --- (limited to 'src') diff --git a/src/tk/box.c b/src/tk/box.c index 1a45589..ca60ab2 100644 --- a/src/tk/box.c +++ b/src/tk/box.c @@ -67,7 +67,8 @@ _mftk_box_event(struct mftk_widget *w, SDL_Event *e, int x, int y) rect.w = b->child->w; rect.h = b->child->h; if (SDL_PointInRect(&p, &rect) == SDL_TRUE) { - return mftk_widget_event(b->child, e, x, y); + return mftk_widget_event(b->child, e, + rect.x, rect.y); } break; default: diff --git a/src/tk/grid.c b/src/tk/grid.c index 67fa677..de6d430 100644 --- a/src/tk/grid.c +++ b/src/tk/grid.c @@ -102,7 +102,8 @@ _mftk_grid_event(struct mftk_widget *w, SDL_Event *e, int x, int y) if (SDL_PointInRect(&p, &rect) == SDL_TRUE) { return mftk_widget_event(child, - e, x, y); + e, + rect.x, rect.y); } } } -- cgit v0.9.1