summaryrefslogtreecommitdiff
path: root/ivi-input-modules
diff options
context:
space:
mode:
authorEugen Friedrich <efriedrich@de.adit-jv.com>2023-01-20 11:27:29 +0100
committerEugen Friedrich <efriedrich@de.adit-jv.com>2023-01-20 11:27:29 +0100
commit386b29ee71c6d8faf62b93f11653b6869719f627 (patch)
tree6412bdff626706810408e0e4967f3eb14f89595e /ivi-input-modules
parent90a904b0ad57b5a4149a366307b54249bc109854 (diff)
parentcfc607123fc73e24faf5312f9beca2cfac6c6567 (diff)
downloadwayland-ivi-extension-386b29ee71c6d8faf62b93f11653b6869719f627.tar.gz
Merge remote-tracking branch 'upstream/pull/125'
* upstream/pull/125 ivi-input-controller: ivi-controller: Copy over weston internal functions Reviewed-by: Eugen Friedrich <efriedrich@de.adit-jv.com> Reviewed-by: Harsha M M <harsha.manjulamallikarjun@in.bosch.com> Tested-by: Doan Ngoc Au <au.doanngoc@vn.bosch.com>
Diffstat (limited to 'ivi-input-modules')
-rw-r--r--ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c b/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c
index 826ee47..82900dc 100644
--- a/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c
+++ b/ivi-input-modules/ivi-input-controller/src/ivi-input-controller.c
@@ -758,12 +758,29 @@ input_ctrl_touch_set_west_focus(struct seat_ctx *ctx_seat,
}
}
+/** Check if the touch has focused resources.
+ *
+ * \param touch The touch to check for focused resources.
+ * \return Whether or not this touch has focused resources
+ */
+static bool
+ivi_weston_touch_has_focus_resource(struct weston_touch *touch)
+{
+ if (!touch->focus)
+ return false;
+
+ if (wl_list_empty(&touch->focus_resource_list))
+ return false;
+
+ return true;
+}
+
static void
input_ctrl_touch_west_send_cancel(struct weston_touch *touch)
{
struct wl_resource *resource;
- if (!weston_touch_has_focus_resource(touch))
+ if (!ivi_weston_touch_has_focus_resource(touch))
return;
wl_resource_for_each(resource, &touch->focus_resource_list)