From 683e89d7257d5d303071f9c63e238c8bb11400a9 Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Thu, 5 Sep 2024 14:06:31 +0200 Subject: [PATCH] update built-in widgets' event handlers to default to jwidget --- src/jfileselect.c | 2 +- src/jframe.c | 2 +- src/jinput.c | 2 +- src/jlist.c | 2 +- src/jscrolledlist.c | 3 +-- src/jwidget.c | 1 + 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/jfileselect.c b/src/jfileselect.c index ee6e8c9..6f4a0fc 100644 --- a/src/jfileselect.c +++ b/src/jfileselect.c @@ -567,7 +567,7 @@ static bool jfileselect_poly_event(void *fs0, jevent e) } } - return false; + return jwidget_poly_event(fs, e); } static void jfileselect_poly_destroy(void *fs0) diff --git a/src/jframe.c b/src/jframe.c index fe2c897..b604e7b 100644 --- a/src/jframe.c +++ b/src/jframe.c @@ -379,7 +379,7 @@ static bool jframe_poly_event(void *f0, jevent e) return true; } - return false; + return jwidget_poly_event(f, e); } /* jframe type definition */ diff --git a/src/jinput.c b/src/jinput.c index 85c9227..1758b33 100644 --- a/src/jinput.c +++ b/src/jinput.c @@ -332,7 +332,7 @@ static bool jinput_poly_event(void *i0, jevent e) i->widget.update = 1; } - return true; + return jwidget_poly_event(i, e); } static void jinput_poly_destroy(void *i0) diff --git a/src/jlist.c b/src/jlist.c index 9542cc3..9770979 100644 --- a/src/jlist.c +++ b/src/jlist.c @@ -259,7 +259,7 @@ static bool jlist_poly_event(void *l0, jevent e) return true; } - return false; + return jwidget_poly_event(l, e); } static void jlist_poly_destroy(void *l0) diff --git a/src/jscrolledlist.c b/src/jscrolledlist.c index b9adeab..174524d 100644 --- a/src/jscrolledlist.c +++ b/src/jscrolledlist.c @@ -68,8 +68,7 @@ static bool jscrolledlist_poly_event(void *l0, jevent e) if(e.type == JLIST_MODEL_UPDATED && e.source == l->list) shake_scroll(l, true); - /* Allow the events to bubble up */ - return false; + return jwidget_poly_event(l, e); } /* jscrolledlist type definition */ diff --git a/src/jwidget.c b/src/jwidget.c index 77c1ab3..6ec9624 100644 --- a/src/jwidget.c +++ b/src/jwidget.c @@ -89,6 +89,7 @@ bool jwidget_poly_event(void *w0, jevent e) { J_CAST(w) (void)w; + (void)e; return false; }