summaryrefslogtreecommitdiff
path: root/ivi-input-modules/ivi-input-controller/src
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2022-01-16 21:47:29 +0100
committerMarek Vasut <marex@denx.de>2022-01-23 01:03:33 +0100
commitcfc607123fc73e24faf5312f9beca2cfac6c6567 (patch)
tree526d202ae9a3551839cce238acd298c92054d284 /ivi-input-modules/ivi-input-controller/src
parent8d4c227ca0a1f836a769a051732a826abbf5d98a (diff)
downloadwayland-ivi-extension-cfc607123fc73e24faf5312f9beca2cfac6c6567.tar.gz
ivi-input-controller: ivi-controller: Copy over weston internal functions
Both ivi-controller and ivi-input-controller access functions which are internal to weston, which means the ABI of these functions may change or they may even be completely removed. So far, this wayland-ivi-extension was able to link against libweston and use those functions by sheer luck, but that may eventually run out. Copy over the internal functions as of weston commit 2c1ed289 ("build: bump to version 9.0.92 for the beta release") Signed-off-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'ivi-input-modules/ivi-input-controller/src')
-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 a0bfc48..680f75d 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)