summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2021-08-04 21:16:46 (EDT)
committer P. J. McDermott <pj@pehjota.net>2021-08-04 21:16:46 (EDT)
commit22bb32eecf58a5317f6bad2958923fa1172f61e0 (patch)
treeb6abb1301e29b3ac9e02538dd5aea165ea777350 /src
parent10fe7025eb8025980b2ed2bcadee0e729485ae30 (diff)
downloadmazefight-22bb32eecf58a5317f6bad2958923fa1172f61e0.zip
mazefight-22bb32eecf58a5317f6bad2958923fa1172f61e0.tar.gz
mazefight-22bb32eecf58a5317f6bad2958923fa1172f61e0.tar.bz2
tk: Fix container event passing
Diffstat (limited to 'src')
-rw-r--r--src/tk/box.c3
-rw-r--r--src/tk/grid.c3
2 files changed, 4 insertions, 2 deletions
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);
}
}
}